<?php
declare(strict_types=1);
namespace App\Common\pay;

use http\Env;
use Psr\Log\LoggerInterface;
use App\Common\Common;
use App\Common\Guzzle;
use Hyperf\Di\Annotation\Inject;
use  App\Common\Curl;
use function Hyperf\Config\config;
use function Hyperf\Support\env;
class Withdraw{

    #[Inject]
    protected Common $Common;
    #[Inject]
    protected Guzzle $guzzle;
    #[Inject]
    protected LoggerInterface $logger; //存储日志

    //rr_pay
    private string $rrpay_url        = "https://top.adkjk.in/rpay-api/payout/submit";                 //提现地址
    // private string $rrpay_merchantNo = "999";//测试
    private string $rrpay_merchantNo = "1103"; //正式
    private string $rrpay_notifyUrl  = "rrpayNotify";  //回调地址
    // private string $rrpay_Key        = "abc#123!";//测试
    private string $rrpay_Key        = "7YzlqZ6xhpkhj5B0"; //正式




    //ser_pay
    private string $serpay_url = "https://paypout.metagopayments.com/cashier/TX0001.ac";//下单地址
    private string $serpay_key = "353FD9914A2C8C619FE6F2E1B8CD45E0";//商户密钥的值
    private string $serpay_orgNo = "8240800048";//机构号
    private string $serpay_mchid = "24082600000048";//商户编码
    private string $serpay_backUrl = "serpayNotify";//回调地址
    private string $serpay_account = "2408260000004802138";//代付子账号


    //sertwo_pay 唤醒
    private string $sertwopay_url = "https://paypout.metagopayments.com/cashier/TX0001.ac";//下单地址
    private string $sertwopay_key = "C32FA37CC0421E6231E6E7EDC8C26C5F";//商户密钥的值
    private string $sertwopay_orgNo = "8241100128";//机构号
    private string $sertwopay_mchid = "24110100000126";//商户编码
    private string $sertwopay_backUrl = "serpayNotify";//回调地址

    private string $sertwopay_account = "2411010000012602138";//代付子账号




    //tm_pay
    private string $tmpay_url = "https://beespay.store/gateway/v1/pay/transfer";          //下单地址
    // private string $tmpay_merchantNo       = "1M6S80Q0T1";                                   //商户号测试
    private string $tmpay_merchantNo       = "1HHF923W30";                                   //商户号正式
    // private string $tmpay_appid   = "M1E3123051824F36ABFBB75250B0A0DC";  //app_id 测试环境
    private string $tmpay_appid   = "37B6BD129BE9447E9070CFF6D69E956F";  //app_id 正式环境

//    private string $tmpay_Key    = 'KM@8gfWwK0WkZ1#!ux6svzV1ADV:Ftz!*9%A%yW@VZjG=lYMxyIjTB0fw0u#cz0l8RX7ir1#J7fjwop%XJ%f:cZUr$:g041sx^Se3f$X*?tNv3*1DFbT7%R39VTynS8D';//测试
    private string $tmpay_Key    = 'KZd!m7L?eL:A7lCH#vQHOCGC:AAUMSJ:$zX^gOREKpNuDWyl^h*ZU?LWOrbBYK7n00avVwwA=hAe~ZOCW7ll8gCY!l@5sSwRr9vQH8Af&Xd5NH5J:VNsgqK_bW!k1fdD'; //正式
    private string $tmpay_notifyUrl   = "tmpayNotify";



    //waka_pay
    private string $wakapay_url = "https://wkpluss.com/gateway/";          //下单地址
    private string $wakapay_merchantNo       = "8890439";                        //商户号
    private string $wakapay_Key    = "8eba3208c2b6070cbf431013bea8fd14";  //商户秘钥
    private string $wakapay_notifyUrl   = "wakapayNotify";


    //fun_pay
    private string $funpay_url = "https://api.stimulatepay.com/api/payout/create/order";          //下单地址
    private string $funpay_merchantNo       = "pcI98HftC1SLR8qj";                        //商户号
    private string $funpayKey    = "5e48c9b9170f493185f8c9a96c45b487";  //商户秘钥
    private string $funpay_notifyUrl   = "funpayNotify";


    //go_pay
    private string $gopay_url = "https://rummylotus.online/api/deposit/create";          //下单地址
    private string $gopay_merchantNo       = "2023100015";                        //商户号
    private string $gopayKey    = "d65cc4596f20499ea4af91a998321f5c";  //商户秘钥
    private string $gopay_notifyUrl   = "gopayNotify";


    //eanishop_pay
    // private string $eanishoppay_url = "https://gateway-sandbox.eanishop.com/pg/v2/payout/create";//测试地址
    private string $eanishoppay_url = "https://gateway.eanishop.com/pg/v2/payout/create";//正式地址
    private string $eanishoppayAppId    = "4f630c1ee9e243ef840303438c21da0f";
    private string $eanishoppayAppSecret    = "6725bd87b3bc43419e2ff4d616d4a2da";
    private string $eanishoppay_notifyUrl   = "eanishoppayNotify";


    //24hrpay

    private string $hr24pay_url = "https://pay.24hrpay.vip/api/unified/agentpay/apply";          //正式
    private string $hr24pay_mchId    = "50000567"; //正式
    private string $hr24pay_appKey    = "CABS32R2LZEGAQWRUMM1N7OLPHJ512N1Z9EL7BHYT1ZBQLHYNE1SXW8WF0LBO0XYFQLOT1VLHK0YUWO4T89G8QJC12SL8UCGSOKPAXZZFJTLZWVJ82K73UR6EUKLJSPK"; //正式
    private string $hr24pay_notifyUrl   = "hr24payNotify";




    //ai_pay
    private string $aipay_url = "https://aipay.cool/gateway/";          //下单地址
    private string $aipay_merchantNo       = "862360";                        //商户号
    private string $aipay_Key    = "517faa1fd5cbd6b13541b90f97fe9625";  //商户秘钥
    private string $aipay_notifyUrl   = "aipayNotify";





    //x_pay
    private string $xpay_url = "https://pay.xpay.wang/api/transferOrder";   //下单地址
    private string $xpay_mchNo       = "M1669706824";   //商户号
    private string $xpay_appId       = "6385b4487bd27c0dd2ccb6fb";
    private string $xpay_notifyUrl   = "xpayNotify";                 //回调地址
    private string $xpay_Key    = "Tc5YVPZKwck6esXi697jxMDTjvc7ojaWOluTFaiq4kvuO7rmvLIAmSqDQCanXu5NuItfanr4PPEs4bNmkXqTsRMiPiz6vfJI2JNj1AEDU7guTdsQ9IQ4fmFVRfJIoOSz";



    //lets_pay
    private string $letspay_url = "http://api.letspayfast.com/apitrans";                                   //下单地址
    private string $letspay_mchId       = "722931450180";
    private string $letspay_notifyUrl   = "letspayNotify";               //回调地址
    private string $letspay_Key    = "YFYCHSXAY6DPNS5A0NUYGDD66NSUFXFCUIPCLTXWNQJF0HG5V5IMQKC7AIC071HXZZERDBOBLPIOQUUROFA2AIQKUZDWJTP3N06ZKJPXWJSBJRFORFLGDY5MP3U7VPHE";



    //letstwo_pay  lets_pay原生
    private string $letstwopay_url = "http://api.letspayfast.com/apitrans";                                   //下单地址
    private string $letstwopay_mchId       = "723450269337";
    private string $letstwopay_notifyUrl   = "letspayNotify";                //回调地址
    private string $letstwopay_Key    = "IZUGUT9LZR6LQIUGV6HMHJZUPREJTNWAZ8R99SJQNFCUBOUYKEK0LZUWWJ6GNIE6ENZNTKX9DKCYBRRJ0VJWXER9S1OVEVGLKWINIMRCL1HEHUJPKJ5IX0ZGX59SE0TL";


    //ant_pay
    private string $antpay_url = "https://api.antpay.life/v2/withdraw";                                   //下单地址
    private string $antpay_merchant_code       = "AM1723630965609";
    private string $antpay_notifyUrl   = "antpayNotify";             //回调地址
    private string $antpay_key    = "43e795347e032fa4d439706ac01309f5";

    //ff_pay
    private string $ffpay_url = "https://api.wepayglobal.com/pay/transfer";                                   //下单地址
    private string $ffpay_mchId      = "100777805";//正式
    private string $ffpay_notifyUrl   = "ffpayNotify";             //回调地址
    private string $ffpay_key    = "UMAB1GFQ1KGBPOANDSLTBMGYCOGFZRBF";//正式



    //cow_pay
    private string $cowpay_url = "https://pay365.cowpay.in/v2/withdraw";                                   //下单地址
    private string $cowpay_mchId      = "1723714607199";
    private string $cowpay_notifyUrl   = "cowpayNotify";             //回调地址
    private string $cowpay_key    = "9c8303152d19b5aac5336bcd5f16fc34";



    //cowtwo_pay  //原生
    private string $cowtwopay_url = "https://pay365.cowpay.in/v2/withdraw";                                   //下单地址
    private string $cowtwopay_mchId      = "1741771173009";
    private string $cowtwopay_notifyUrl   = "cowpayNotify";             //回调地址
    private string $cowtwopay_key    = "1fe7fe1646e98684efd6a3fb3087db98";


    //wdd_pay
    private string $wddpay_url = "https://www.wddeasypay.com/out/orders";                                   //下单地址
    private string $wddpay_mchId      = "10238";
    private string $wddpay_notifyUrl   = "wddpayNotify";             //回调地址
    private string $wddpay_key    = "sLwEMOQjDKorywnP";



    //timi_pay
    private string $timipay_url = "https://www.timipay.shop/lh_daifu/agent";                                   //下单地址
    private string $timipay_mchId      = "529098346";
    private string $timipay_notifyUrl   = "timipayNotify";             //回调地址
    private string $timipay_key    = "56c773f8e761b72c722e1ff1991d2547";



    //newfun_pay
    private string $newfunpay_url = "https://api.funpay.tv/singleOrder";                                   //下单地址
    private string $newfunpay_mchId      = "1059"; //正式
    private string $newfunpay_notifyUrl   = "newfunpayNotify";             //回调地址
    private string $newfunpay_key    = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJMRc60xlWTJmdtm6jFkbk2LNiax2d/bFWw46oXydTuR4HXU2eX0QVpClogKn2CdkA4vwmYt9pc8POwEfwBqq3jMz8Si/5i6YIskdmnktiNa6D/lB0K22CFWQxo+ks/BH7k+pas2+IyL6KO2EHsSwG/67jrjnB3XTLqIndvYNV+zAgMBAAECgYAabL7Tpj6ZEu4tsWKwCEMXdMWAk2E56zQAs4NUGPn+f5oMofea7VXWwXMps3rqkbUCD4vG70hI6T5rC+3D5ea0Mpk5YFd2HW8LEyS2VBAcADkfLYRf6KIChFQ3fvTiqxP1qmVyO7mDlxkuLgMOPSX5kp6JL/hsf3esS+gNcvqFLQJBALvxkkh/JBT0MRMp9zb33ma0Yl/gqqvU9ujqmVzgEknKpNFF2kVpWBdJ56ORTEwgR8BuXisYYfQdsfCGUy/seh8CQQDIUraK4H5HgLYRQoCkBBNFSlMvZV60FicEd3RHjY0QDa4fJrD+LJMFt9loAZXBC226uxYXtjyc1w6EPFT9z4/tAkAzPa2wblmcDOfEXdC0/+d3AP9BPLPLnYikADJIDB9wVvuQwwa7nfkSgGfTRK4Uo0hswqqR/VfXgrEc7sKHcmXpAkBkFi9uI8v0HbLZ3Mg5KnAWZpQ5UgSHJapI6QYH2glow+0DU2mLFOpAKSNOe7w+v18LtP3MyxhtpGV0XFB6n4HhAkEArnUMYgOQHWJHqNrxoDuzYA3alfpHe8/S7VHZ3oPB3FAmpLQDx81C3+7q5MOlHASTU8qvMNEirJeAW3wuyhteaw==";//正式



    //simply_pay
    private string $simplypay_url = "https://api.simplypay.vip/api/v2/payout/order/create";                                   //下单地址
    private string $simplypay_appId      = "3846f553e7a1230c18308af654b688bc";
    private string $simplypay_notifyUrl   = "simplypayNotify";             //回调地址
    private string $simplypay_key    = "158aa68d9454f18962e14c7a541e73a9";


    //simplytwo_pay
    private string $simplytwopay_url = "https://api.simplypay.vip/api/v2/payout/order/create";                                   //下单地址
    private string $simplytwopay_appId      = "7184076527b71034f6a7bdf437c2acf0";
    private string $simplytwopay_notifyUrl   = "simplypayNotify";             //回调地址
    private string $simplytwopay_key    = "8fac2bd53e50c19c4ad9e1d7a030a3a6";



    //lq_pay
    private string $lqpay_url = "http://lqpay.txzfpay.top/sys/apple/api/draw";                                   //下单地址
    private string $lqpay_deptId      = "1710169284135714818";  //机构号
    private string $lqpay_mchId      = "22000023";
    private string $lqpay_notifyUrl   = "lqpayNotify";             //回调地址
    private string $lqpay_key    = "MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAN231QFbn8xmA83LecawDmnoHPD4asBG79dJkknggqQgW8yG1dRNnevsJRPZyDMQMRObPnIYIB0KOQ3ewyUjfrEsphJdTeIZUn1zYfuTPAkRsjv8w5xvMwG3WF7RSDh4p7wnXleowmxw2D5U5/k3cahfL5SNqaJXBzLVprHRZK3DAgMBAAECgYAZnJs38XAXqe8ljiwuhfbcSApT0bZvKKKbAW4rJ4qfz/cavLaltCOadahgzyb/sw6gP64qetv2ztABaKqtNxjywmfXZkG5eKk5sHUdHJAPXe5xGvVbXcXtCg9uFLuolu0Qhh6g4MuEXfZ5/HhIMHopJKW1eneYOoJJKr+3miopxQJBAPjk+qZ2QMLLx2E9VCnK7sZCkZA6UntagvaMg7ml9pWjxRrTDjWqBBcl3XyXvsj848W21hdCwWdhUKfnPsoiTq0CQQDkDDy40PpPc77soa8u+BRcP7smKuYf9wluSaCv/4sYKw6yWmPLX8leHXCWf9oZbqSvJwH8bVBaxl/NT198rKwvAkBz4aB1ul8CkwAcXQJ/htVPB5VgUlcuyYBqLBf0arn5B8vwZk2aXLMU1/NcXAZe66dc2XiqUdFcQanc0sSgNgLtAkBipFhvqRVc4LgpKxbXvj8wV/Df5ZZ9JSJTLk3vUx4baiSFSUv5YIl9yEY3Ez6H2bAqgzj8s1wap8wwxrCLATXJAkA7DE4k6B9cSwndrS2djI9JHItrLUkoFNjVq79frH8PcFXVJG7c3mG3nxXxb8n4dl5qt8W9Iy6hE3zCilz7AcRb";



    //threeq_pay
    private string $threeqpay_url = "https://pay.3qpay.org/api/payout/pay";                                   //下单地址
    private string $threeqpay_appId      = "66c81be0e4b00bf3fc383a31";
    private string $threeqpay_mchId      = "M1724390368";
    private string $threeqpay_notifyUrl   = "threeqpayNotify";             //回调地址
    private string $threeqpay_key    = "HsSxrEU6sHIW32udk8xKR055q5lqzqtJzbCoMnBFmrXAGc2TvAFrMRKONSuXfuMaBKh8f2RvEP0o3buoKl7i5WINymzPnkYMgg5BPyE5FDb7E5UjSm9ePjEDCrKDUjsK";



    //show_pay
    private string $showpay_url = "https://api.pymrummy.in/v1/payout/withdraw"; //正式
    private string $showpay_mchId      = "594"; //测试
    private string $showpay_notifyUrl   = "showpayNotify";
    private string $showpay_key    = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAM+Iv1PZpepReT7AwWZTeuRSGNEKtrJS/U/DWSg16sjAFeDcoOG7FLeKsNQTeCJm5Vt8MKblpJUF4wRFytrvDF02reCP7ceUkGq3vwClsF7tE2wfcEpThMHFoGVhRsxz6cCFdESL/3C79PkkMVOeKkxYphzcybxeVJmfGsXj8CKdAgMBAAECgYEAkrl9e0y/TqB3dfRVR4Dxu4aHYROQAxdFXCUiXZlw+qlDTozteWoIxZLaXbW+E6Rnt3xf8T8eUvWsgJLPTmX/eIhkZSx+kvKfdJ/xKBEC0kUl6xgnaFWfZ7rzgG2Z3gLiP+6gd/Pfah43XVK3AeFN2KJZP8GNG/EaMjUmYYHozwECQQD6pyhv6c22BRUv5vUBA0LTki5+fcxpRHPmuqran537UQSQ/7prjxWROXhGZjKL45xzkFUF6ksb5pNAkxUs7vI9AkEA0/Yc+a8MG0j1rz01xAVOLecIqikLQ3X9WI2jzPmS73N9klluInnCiFSbQPpuiumlDbTNsQg7RFzg98sGzizX4QJAGdi+3Lt5UPm5M5VXUmFptLNwQ+7o8znx0asSDzVCbzXtiJ42NP0uNil885V6RN6VtXz+p3t/f0MJkDEaj+Wb6QJAIoqg/i+AkZG6N+yJroAO1Xwo9VHq+/tmZd/vKaAiSdNQS2E3iXa+NOlUw6oMCac5tpoYSxlET0ezga4cVc0JAQJARx4/vNVQVt4ukNgYlICLYAwhmnw3Xk1u0/HCymLXGswyQz2Jc3vZo72vkLfoh/lBhx2pRQ04JpRD5RuBGNj5aw=="; //正式




    //g_pay
    private string $gpay_url = "https://api.gpayindia.com/admin/platform/api/out/df";
    private string $gpay_mchId      = "1828416315993178114";
    private string $gpay_notifyUrl   = "gpayNotify";
    private string $gpay_key    = "0356d6cd250eee7ba9ef9f7a1aa10250";



    //tata_pay
    private string $tatapay_url = "http://meapi.kakamesh.com/pay_api/PWithdraw";
    private string $tatapay_mchId      = "20000034";
    private string $tatapay_notifyUrl   = "tatapayNotify";
    private string $tatapay_key    = "9DC31B9E08D243E297C040D105DD3B1E";

    //pay_pay
    private string $paypay_url = "https://api.paypayonline.vip/api/payOutOrder";
    private string $paypay_mchId      = "3132FB00A9144EABA6E5243DA32FA23F";
    private string $paypay_notifyUrl   = "paypayNotify";
    private string $paypay_key    = "3CxPH8MjrtWxU3chLfbA3t4cbcH43OFo4gf4U1gOhtEMgTS8grP9iOTelwLoKWGy";



    //yh_pay
    private string $yhpay_url = "http://gateway.yhpay365.com/api/remit";
    // private string $yhpay_mchId      = "91000005"; //测试
    private string $yhpay_mchId      = "91000048";  //正式
    private string $yhpay_notifyUrl   = "yhpayNotify";
    // private string $yhpay_key    = "3jdS5RnwUnSNsOUQvfICZhps";//测试
    private string $yhpay_key    = "7jqPfsyzqLSfuPlKpxkuEpQk";//正式




    //tmtwo_pay
    private string $tmtwopay_url = "https://beespay.store/gateway/v1/pay/transfer";          //下单地址

    private string $tmtwopay_merchantNo       = "192UNCC334";                                   //商户号正式

    private string $tmtwopay_appid   = "3E2591A316794E53969538D4CFF849D8";  //app_id 正式环境

    private string $tmtwopay_Key    = 'K#wuMZPkbp8HD^TipRxv1R2~_Ux*Ua^JlSxZrLok=7^3urQ%QG_qpxfCQYPS0A7%tcWDSIea%Z7g1k!xOkAuRTpk&sWcWm_k6::41?nB$ewpA$*EBj7db@S~5UPTgefD'; //正式
    private string $tmtwopay_notifyUrl   = "tmpayNotify";




    //newai_pay
    private string $newaipay_url = "https://gtw.aipay.today/api/payout/pay";          //下单地址
    private string $newaipay_merchantNo       = "M1737210647";                                   //商户号正式
    private string $newaipay_appid   = "678bbb17e4b06d5d4860a32c";  //app_id 正式环境
    private string $newaipay_Key    = 'i6zCXBEMuIjs0AmsBMEsrN9Wodyy33S4RkC2TKh7bwhRLbgmAY998zk5Xa6NbRzA2JEt17owjz1rKeXBmdqCdMfjwR6MTlMxHYhN5CtAY6oVulnNf8XJmblb8G5wjKaf'; //正式
    private string $newaipay_notifyUrl   = "newaipayNotify";



    //make_pay
    private string $makepay_url = "https://novo.txzfpay.top/sys/zapi/withdraw";          //下单地址
    private string $makepay_appkey   = "1829113188401680385-1840045975921152002";  // 正式环境
    private string $makepay_Key    = '04003728683241822137002479242609'; //正式
    private string $makepay_notifyUrl   = "makepayNotify";




    //rrtwo_pay
    private string $rrtwopay_url        = "https://top.adkjk.in/rpay-api/payout/submit";                 //提现地址
    private string $rrtwopay_merchantNo = "1347";//

    private string $rrtwopay_notifyUrl  = "rrpayNotify";  //
    private string $rrtwopay_Key        = "A2SzHXv8U8EBPKH6";//



    //best_pay
    private string $bestpay_url  = "https://gateway.bestpay-cus.com/payment/payout";                 //下单地址

    private string $bestpay_merchantNo = "67";

    private string $bestpay_notifyUrl  = "bestpayNotify";  //回调地址
    private string $bestpay_Key        = "MIICeQIBADANBgkqhkiG9w0BAQEFAASCAmMwggJfAgEAAoGBALB+zfoVSdUZKUladjZZOL68mzCcvCN2TVvIZTd2OlPnSMTYvRKy+WXNI3FyZCTiXxjDgYhNXNRUgrz7eRzKYGUEAAbJW6UIRxQlCvXzInDanoA5xQpGJO1VuyQq2khX2FuZHnjsNhzghSeufEwsXoi+IrpTGB7irhTZMY4kucHRAgMBAAECgYEAqAG9Lw7uvmR6MbJkDu41nxNIoyi/yv4FO5ZyCy6G7XGfiopKyS8HSwnQcGCUxaubHKaWeloyQIjF/wFe07ItuMY6Z/nFrrzBfSzve29UsQx/bRPD8bRwMjscyIVhTfUrj97vODByWbP6MqVByfvRkMRyyQUNz60jc8Ow7BowfgECQQDVotdAkEawM8A1lPxcr0YlgeaN6lIkUf/W9ftDiAgtKPpft+lstCKF4R9zLZl0BD8niFpzCxm9pipXcVa7Ap6hAkEA036GtJGBof3oWdJ5xWTbLxmhjKFf04U4WuFkykbughvtPlhUNAEY3NSVMvaOlfuyveFD+c8+BBZLl5daqXhFMQJBAMHfP1w2EhBBRoLZq5Mo9I2BLwtGxDh1uakIHXeRcWoaL+zBZ7HgXxwDypipnwKr/+wOT5brUfbLXs1v63dWz0ECQQC5yLHIOPGpPYQ4Mz4o+lnYXCmfgbrN8n74xnplfj3SKXoUhD8jl7shcdTGefPzKLFxP0sZTMXrjTJGLfzEVhRhAkEAzNi5Znfp5PoPsmCMcn3rLDFK6lJevroeAOfhgb11bwKjLwhFJtIHG9EWJ+hhMuTu4bLGZRg6aE3Woo0uSWycRw==";//测试

    //zip_pay
    private string $zippay_url  = "https://zippay-api.com/payment/payout";                 //下单地址

    private string $zippay_merchantNo = "524";

    private string $zippay_notifyUrl  = "zippayNotify";  //回调地址
    private string $zippay_Key        = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBANaAjl2Rj90yaPQSQ0MKoCPN+XnP/5JZqrrJHrKajQtxxFAyts0cn+fkwvI7ytjQNa5dQlDYjcsRGXV0Zy7Yt63102QhPN8IOikXQqkiSazKS3p7N8Qx8VXUu96o9Kcl4u1uyR4Oz7yyvNv32r1+0PcHCf1Op4rZsojcDx/s5omNAgMBAAECgYA/gYIky7LHL2SJVlrZn2y4DQRefylQYAG/GUpgYId/qugPQmSCp4XkNwNMik1NEZ/DBtNacjLQuzhJYPQnl3wRlvGaW/pUlskXsbhzcS/7CDKF2sWQxotASNAnGUjvHv10ienv6EAgkFX6UhlQPsN+E/5lcYc5C8fMBZ3iq5/u9QJBAPcWViiYsAfaA1PMuJ2XE3ovjbgHL++UAj9c9i+sUD+bzAXjPPfSwdoQmHwsgYcMVeGXecIlYy0PO6o7p/z8ny8CQQDePVIwXO3tjVtA+MR4CggSpRZYdZNfsbCtp6I5WEWyHXG3PJdtFzmQUu7DteiU77+/41rfjgj45ny2n4wGTxQDAkEA67OGCwHkYgkJRYYz0jjMnrEAOr24b408O599ROrWPmdrT25+uVV2EIPmQgXepaoRvrpVruslWVV/sBtqW33MhwJAQNqaQnzL/hfTOnmeM/2Rb4d3pubg0/sxuOuDfsKQzDKlfbiT5AT0Cnb5MGnEbrosNd4uJbD4U1JHsK+MmEa5awJALAsGom5KBkI2p2RzezF1/DtrWnCI55MRC2KQ0mxYNXhaHzkVl9XII8HmBxhX8U7vBwLNzonPK9+2QZSVoJ6E6A==";//测试





    //upi_pay
    private string $upipay_url  = "https://api.upi-pays.com/api/payout/createOrder";                 //下单地址

    private string $upipay_merchantNo = "258"; //正式

    private string $upipay_notifyUrl  = "upipayNotify";  //回调地址

    private string $upipay_Key        = "c5C6XrNbA82a134";//正式



    //q_pay
    private string $securitypay_host  = "po.i-paying.com";                 //下单地址
    private string $securitypay_tokne_url  = "https://po.i-paying.com/v1.0/api/access-token";                 //下单地址
    private string $securitypay_url  = "https://po.i-paying.com/v1.0/api/orders";                 //下单地址
    private string $securitypay_appid = "AKDDIU3FHI39"; //
    private string $securitypay_notifyUrl  = "securitypayNotify";  //回调地址
    private string $securitypay_Key        = "DUWM1BUYCEX894I6HG0A";//


    //vendoo_pay

    private string $vendoopay_url  = "https://api.seapay.ink/pomfret/v1/payout/order";                 //正式


    private string $vendoopay_merchantNo = "777bet"; //正式

    private string $vendoopay_notifyUrl  = "vendoopayNotify";  //回调地址

    private string $vendoopay_Key        = "3e5283781adf6b8ef4f59edea290b3de";//正式



    //rupeelink_pay
    private string $rupeelinkpay_url  = "https://open.rplapi.com/rupeeLink/api/remit";                 //

    private string $rupeelinkpay_merchantNo = "241014137451"; //

    private string $rupeelinkpay_notifyUrl  = "rupeelinkpayNotify";  //回调地址
    private string $rupeelinkpay_Key        = "eauxMNmns50iG22vqKfXaD0jIhLEy1kW";//




    //unive_pay
    private string $univepay_url  = "https://ydapi.univepay.com/API/GlobalSettlement";                 //下单地址
    private string $univepay_merchantNo = "C24638"; //正式
    private string $univepay_notifyUrl  = "univepayNotify";  //回调地址
    private string $univepay_Key        = "CJ3DL5SAC57DGPEY";//正式



    //no_pay
    private string $nopay_url  = "https://icw891o.nopay.app/order/withdrawOrderCoinCreate";                 //下单地址
    private string $nopay_merchantNo = "TBIK6NOXLXUJQ7R1"; //正式
    private string $nopay_notifyUrl  = "nopayNotify";  //回调地址
    private string $nopay_Key        = "TBKqifMFIOeud0rSNzIkW6iIFOmrbTVv";//正式



    //ms_pay
    private string $mspay_url  = "https://agent.msigiosdfih.com/api/payout/order";                 //下单地址
    private string $mspay_merchantNo = "777bet"; //

    private string $mspay_notifyUrl  = "mspayNotify";  //回调地址
    private string $mspay_Key        = "1B002AB86AC1E91BAB92C5E3EB9352E7";//


    //decent_pay
    private string $decentpay_url  = "https://api-in.zupay.top/pay/payment/disbursement/create";                 //下单地址
    private string $decentpay_merchantNo = "1072"; //
    private string $decentpay_appId = "107201"; //
    private string $decentpay_notifyUrl  = "decentpayNotify";  //回调地址
    private string $decentpay_Key        = "fLgwZ5V7sqavYNSPzq8hStsj6pBA74CJ61l4HH3php7xqqXiNxJzNagxIILvUY6tNUKlU8MR8NDC+SLrBVaoiw==";//



    //fly_pay
    private string $flypay_url  = "http://www.inspay.org/sapi/payment/common/payout";                 //下单地址
    private string $flypay_merchantNo = "999911256"; //

    private string $flypay_notifyUrl  = "flypayNotify";  //回调地址
    private string $flypay_Key  = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCp5ZoYlL/4gGcO1N9PXhvUQ/3uh1SgTkCwjOXKMQYk7JeSSK+32Px3jZt8GoyjC/9J66ybpPdKyJLoaSmD5av/rw3jyUOL6rdfwo0pzdK75kfxsJUOqtVy3+gOTSRQCvVEjqROwZVdzOlgzUTmBLT7mdALRDWh1wSeur887OAJsXKAN8aJ4fakpjX5234kayyLYfYfqEmeUytN//HN/v1T4BcfTzkJLD6vLR3a9vI7noyvaofzy3sSlVpHWoDkA5gAbS9D3uE1YI5PodWHabr1PC4d6mD/Bi/6crCKBCPTstJcFWVfOzgLNxJkuEpi2Buz5fObgNIgGkQQNufsmaq/AgMBAAECggEAFwKNuD6NMW7ShmO2St2ID1uWDLQvdfajNEYg6R1yo5WXgaxugAvXRancIRbHbV22maBdpEbXZz17CBcWFFMK1Ho0+2DK0Sxc4Y9L5xmFLQWnQMiVp4LjncdNeoJgJKcXSM242yHExQt3oDCs4CpLCLhwQNZgHSct7QGF3Q6H2UgCQTNxFOpsYHzI8LBqwROGHv5E6/UN9kGUSpQf22LlzhJLb9oJDyvzk2b0m4fb2/7OBJbsdClD7PwCKn+mamvLTbjDBZpSm13tmTtgCRUV25hDREQzyBNeJwHqclK3gMMz58FF0YZIcNBrbWel5v32cZkugDj10J8Gln/g2b6q4QKBgQDq+aa/KDZ0vq/9VaaKWhZL3eeQe4V6hu0FCkqQw6Z2lzlRGVAzOAoLTnvAW31fR7I6xB1w5QkzL3P6GjaH93Cq7HL1um/0MKFLHPaD9i13V5p7YD7qFIjVPlgv+6vkCjrQvvudNi61R9K0y+X9gyGeIppgRUIVL7IUMoqECeiRgwKBgQC5GUPIQ+tiNCW2Hld2kuO5ue0wn5Rj72E7BqrPdgT3TrQc1UTLLO/SQdEXSG5mp+9C8FmikCbDYXWeSXfu8VsJ4Ep/ujHj+J49VqK+sQthA8kvyKUeMMXbL3gF6emstW6kbU3/dLoU9arZGkpNX+PJ1obBjwV1BQiR/93JPx1pFQKBgEE8bIn3zR6eblfkNqeEmVoY0phvYsCAwz85+zezyfx0wan9YCHINimrcXoXLHiOfDIKjq3wOJyoWQefzXH0Rah+mvAUAc8GzVEASoSajUbr4GzObMkqSE8DzxILSk62dFvOGicsis0zkpE1ZrX6eRPhQYDm2ZDuO/+VhJVh9tqnAoGBAKzeiq6DuFccKsg+6CKmpyYzHfGWaEk5LQ6qeGaPa63pBFAVYk1653Pv4i6jh/A6ETvsK1qm1H0PDYFKTkeLhCHiJtHJfITUEj1pJ09/HAh8N6537rYWiQLe/3JOdt3FCNNp/jmBs7SVh/2BDznaP2ym/W3SfB9BFzL7yxAD8RzNAoGBAM67j156oSVF0VH6d2z4/b/9wTLSjG69gzaQMq0eiZPE2TQwZ5MwnmHeUleELOau98BGweNdKBDjxSEzSo//r1GL46usT8Ovy+wDJo62wkBvsnVC9bFmvVTXxTeEshbEm6ylRM5twOmmkoELsVC36XFZ1LKFu87NXdnLOKnyr7fw";//

    //kk_pay
    private string $kkpay_url  = "http://api.zhkap.com/pay/withdraw";                 //下单地址
    private string $kkpay_merchantNo = "1000100020003416"; //
    private string $kkpay_applicationId = "410"; //

    private string $kkpay_notifyUrl  = "kkpayNotify";  //回调地址
    private string $kkpay_appKey  = "2FDE621690694CF9B2FC80EBAB9F53D2";//
    private string $kkpay_merchantKey  = "20E87B6B726846BCACAF261AEFF33B6B";//



    //tk_pay
    private string $tkpay_url  = "https://seabird.world/api/order/withdraw/create/v2";                 //下单地址
    private string $tkpay_merchantNo = "202466298"; //正式
    private string $tkpay_notifyUrl  = "tkpayNotify";  //回调地址
    private string $tkpay_Key        = "fca35368da5d403086dcf248103b432f";//正式
    private string $tkpay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAscZhv82sDJZlWvtD+qVOItCQ1N5Cq/JBYfU9ww0Scp9Uw79S6PoTAfOTydObxp2a4MwKjPelAqO+Tx71vbexX+bc2u4DFKbMLOG9tAyqreiHf+VVN2HXqebuLaAsNHwAq04ll9RXIByuz23wq8IDZPAh6kuDSapI9P8haHDRR5RkWiZTuUSX5zZZFOibw7wrMLQiDjG98RtN38yaIYUInGEBNQofCQQyFwTg3K04H7XIa9mD4itL2rHAUg4UbC6omZ/lVO1O575pmdaMs0s3ZbbhZtjDg4Gg/szXvK/LGspbzCXkLE3ZLxyl5A/ehojnsjBTD1HjnPN3QpjQy72UlQIDAQAB";//

    //kktwo_pay
    private string $kktwopay_url  = "http://api.zhkap.com/pay/withdraw";                 //下单地址
    private string $kktwopay_merchantNo = "1000100020003421"; //
    private string $kktwopay_applicationId = "415"; //

    private string $kktwopay_notifyUrl  = "kktwopayNotify";  //回调地址
    private string $kktwopay_appKey  = "CCDF005D598D432ABE36A10C621819CA";//
    private string $kktwopay_merchantKey  = "8A76608C2D344C279F67FE507CD34ABE";//




    //one_pay

    private string $onepay_url  = "https://api-in.onepyg.com/cashout/india/order/create";                 //正式

    private string $onepay_merchantNo = "3619769596"; //

    private string $onepay_appId = "OJMXy4x3uNmVaOU8Ya"; //

    private string $onepay_notifyUrl  = "onepayNotify";  //回调地址

    private string $onepay_Key        = "MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDY+5ytnLAybiUT7+Av1+EjXos1CLdfr7L9hKJPdIooaRJusNA1pXG2kbg6BfexnkvwHYwyyTnGl6oDpkzxl4qYg+YcjbTIvouxMsP/A5cP5W4nlTvY6D/lexEjmVWbC5FdnXPun1Gh2WGTEqpXIqtEjuVAorC28NpLhtjcZAzYze+HcnvnZywUHBfRUtoa6pXr2Gx1A+yYkJAdZhuEcMzfcBTEJT9V8Jc4CYvrdshJpVO4jU2BV5LIXXY88rxZD/2qViPs27MrIUfeCbrLHGY3c25n3uvf+4hpjUj/biFMmb2ExBMxytLC9EZuZiOv+PsaBiF+KZWIzg8HzSOomHvTAgMBAAECggEACUTKPxJL5oOU+uKKyZBnshqWSLgsGR7IvxKc2lcIlcxTOL49zqTYFCvqWjQqDgDMjp+8fujgmm6dGRXQAJvwFC7CNCMLf23AStv3ylttZwTubStvSIc3P4a/xy0EHqDiX0TcEGvm0UqXY/BurVUySrXt7hJlCROFx6cleViewd4J/kLGHHgsEKy1ocfFym15auCLKWxQjdi7Nn/3w7uUHdq8XlXb+etC1vjcu5cQuDmSiQRup6RZs640ppn1vusJt8CscB0zokYYhMl1dTI5O7TAy94ilgG8SJEF+qKtsNxw/xUeJ8CC8tggRQUSmt4Z5vOOjAZz84AvwQJAGWcRvQKBgQD3OAZL9JZWqnTJgmBGdUpB73tKbKf2utna5B77Sq9dVHHs0N7f5YTHllIR9oKYTue99LdC+2f+7r92drFEiS5Yh996ACFv5K8dGd7M3DoZzjsRiuH2D3dzJXJ9VJ0GpVuGDiT9jV00TBkZYHUh6M8oVSazX3ckbuWzSzUquBoW7wKBgQDgsKZbowzFyiYFPq3ZcmSVPs1VD9wfXgfQaE9JOGX1eFn9+HdnjWMxC3//DyvZWsbXx64Eqfb0AGX1dXQ74YzRRqPR84cH7f9sNLFUv66MECdx+dhi8OddnfeKFjRWdGM4Ge57kc3M+ioJbF9qThJMHJJ6u1eX7H4fLqu28qxJXQKBgQDrAxJRUHE+cApXqZ4WPNfbuGpPBN3jWhtRz7x4DLaKlYU7qA/Hbmv8RDU+qEXbvl7lIGa6wT5KhfHzDsBTs8kgFgJm+wrOUOn7UyWPP+fnsjpK4ekOvgNCrh2ZcT9ZGwbXeEjH1IP+/Dx7+EtBcgzEfbYtnJopQ1cPS3Z+Zsc+dwKBgBxd8QLMuQYXmWk8GpLDYHN/NEky8WV8Z5wmLyxdVHIDOclYnyqRrR46B3TaI30TetsvOIcaNjVj/3tX0s7kkPSy6GfPSRL1NzQgCutaL907BN/c3TbQl0U4dlIWr5DirMweaf9rzwG766a46erv5Ft7l/qqwEpL7zhcmg1E4f95AoGAJqfsBW6PnVVJ6K4oADF4mokFQwXNoTRkZE4vmlcubdpGKL3hiLQGhaXGtkEChxoIPFeO6KgI7Y4N9ptJdMpDy6cPKMwxVrl1fsyHPUt3srwWOzf1GwQ6TVRXxGbNym6X+lPT4UUL3L8rrhcCazSFB0tOkh6aVn6PGlKcUvENtYQ=";//






    //global_pay
    private string $globalpay_url  = "https://gateway.globalpay2024.com/api/payout/order";                 //下单地址
    private string $globalpay_merchantNo = "180318"; //
    private string $globalpay_notifyUrl  = "globalpayNotify";  //回调地址
    private string $globalpay_Key        = "6e143bc02801d64e21369524e885dc0d";//



    //a777_pay
    private string $a777pay_url  = "https://www.777-pay.com/open-api/create-payout-order";                 //下单地址
    private string $a777pay_merchantNo = "ca5e5a7bb1d140669f4907c0f08bf723"; //
    private string $a777pay_notifyUrl  = "a777payNotify";  //回调地址
    private string $a777pay_Key        = "UXCt7sRLGJyFYzQmRLEEMlbeiQygkQ3aFmBmXs";//


    //masat_pay
    private string $masatpay_url  = "https://api.masatpay.vip/api/createTransferOrder";                 //下单地址
    private string $masatpay_merchantNo = "507757308571422720"; //
    private string $masatpay_notifyUrl  = "masatpayNotify";  //回调地址
    private string $masatpay_Key        = "507757308307181568";//



    //ok_pay

    private string $okpay_url  = "https://api.okpayfast.com/pomfret/v1/payout/order";                 //下单地址
    private string $okpay_merchantNo = "KFT030"; //
    private string $okpay_notifyUrl  = "okpayNotify";  //回调地址
    private string $okpay_Key        = "3bd7b313f6241e5ed642f99f348ce672";//

    //l_pay
    private string $lpay_url  = "https://admin.tpaycloud.com/v1/outorder/addOutOrder";                 //下单地址
    private string $lpay_merchantNo = "173167369055727"; //
    private string $lpay_merchantCode = "paystack002"; //
    private string $lpay_notifyUrl  = "lpayNotify";  //回调地址
    private string $lpay_Key        = "00f8800c10354196b9134a8b80522018";//

    //liku_pay
//    private string $likupay_url  = "https://test-api.liku.io/open/v1/payout/create";                 //测试
    private string $likupay_url  = "https://api.likupay.com/open/v1/payout/create";                 //正式
    private string $likupay_appId = "VjMZw6JULQAQAAAAVAAAAABnM_2GAABOU3JkVm56V3Q"; //
//    private string $likupay_appId = "VjMZw6JULQAQAAAAVAAAAABnM_2GAABOU3JkVm56V3Q"; ////正式
    private string $likupay_notifyUrl  = "http://www.3377win.com/Withdrawlog/likupayNotify";  //回调地址
    private string $likupay_Key        = "KuObWdNIw0ZshXcQzDYJyvQ1YI60L2GUmHu9AwHr1IBnzP11P9N2BsjQBZty5pW2";//

    //tatatwo_pay
    private string $tatatwopay_url = "http://meapi.kakamesh.com/pay_api/PWithdraw";
    private string $tatatwopay_mchId      = "20000037";
    private string $tatatwopay_notifyUrl   = "tatatwopayNotify";
    private string $tatatwopay_key    = "AB7F8C74711E45ABA8F40427BF3A73BA";

    //iq_pay
    private string $iqpay_url = "https://api.iqpay.in/payment/payout";
    private string $iqpay_mchId      = "KKQ3WCGCLXS5C56W";
    private string $iqpay_notifyUrl   = "iqpayNotify";
    private string $iqpay_key    = "438cfmqmSlsTtQJ3eY5Ht93uB4TPHbZ1";

    //bo_pay
    private string $bopay_url = "https://gtw.bopay.vip/api/payout/pay";
    private string $bopay_mchId      = "M1732188119";
    private string $bopay_appId      = "673f17d7e4b09f5f408e841b";
    private string $bopay_notifyUrl   = "bopayNotify";
    private string $bopay_key    = "T7xUaCGTBsIhWVwNLIXTdt19oniWsUNgYLjgJU2m4jGT6GEMnPaLKpDQmuEkMxgtN9oMMPRPxx3wlYbESQ21oG88j7fUgRCsXb6iipRiLrvTWk7YtJmyKuNepCYkQ9JE";

    //bud_pay
    private string $budpay_url = "https://www.two-buddy.in/merchant/v1/payout";
    private string $budpay_mchId      = "8852";
    private string $budpay_notifyUrl   = "budpayNotify";
    private string $budpay_key    = "VOAishz8Dwkf3H5EX6Im";



    //buss_pay
    private string $busspay_url = "https://api.busspay.com/create/payout";
    private string $busspay_mchId      = "10094";
    private string $busspay_notifyUrl   = "busspayNotify";
    private string $busspay_key    = "RZCkU1vpJlt027z3mCZJoMVYLQLWq8VL";




    //shark_pay
    private string $sharkpay_url = "https://api.sharkpay.vip/payweb/withdraw";
    private string $sharkpay_mchId      = "10001489";  //正式
    private string $sharkpay_notifyUrl   = "sharkpayNotify";
    private string $sharkpay_key    = "zwlbrelsvk8xad2okxvopstfr6jmufhg"; //正式




    //lemon_pay
    private string $lemonpay_url = "https://api.lemonpay.top/open/api/order/out";
    private string $lemonpay_mchId      = "120084";  //正式
    private string $lemonpay_notifyUrl   = "lemonpayNotify";
    private string $lemonpay_key    = "MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAL7TKhC1ozgF/8ms1TFI2SJZIDEXyGzbFOvdz1hkAykCqq94am3lyPtcTHiMfrZPE6tBLXu9aQMcm6hCQatXvRzJUF9kD+jmltv76nVSsJzGimg9VJv6SLsUPD2tuzyT/NfidoziMCoISZ5LwBr21XnA3KM7ykK5hKiCVggr61EzAgMBAAECgYEAqG2PomH/53H8HBDNt4t6A4QxEsPQJqyUYb9MxNK5q1fsOaaKIegApkQIRxqSuO1BChYkRCShbJqylSet+MMfaaEb3N31FegX9/womTdzpX6aicKgelvK5+27Y5NuGiZAD5iDQ4ufsXfnSa4cU46oLXAgQMxnBfYcHc6BILSbx4ECQQD5G2BvFDjwOxa+qyocCi8Crn6tv81pxyZYJNXvYABAF2fJDUU6DAmCcj/Qr/bIFjMMpttSOm2nLhRLGW1RVWTzAkEAxBrt228riuVoKvrpcUSfb+elwVVCbQ9qHPnHXmbJ05Z1fdaKE7aveyHilExDzcGm/sh8cr05auT+7G9o+5JywQJBAKwzeJ5Q5Gts7XQw7pMjlwvLhFan2F/fA2q7TAiF3KZxh5U8TzapS4mZYPPqMDZw4ilEzygwq8x91hl0IlWvKnECQFUi68isRtcSKVsfe2F1TVKj2s5IWYJHguX5eph9P3nghDmRfnh4g06Ns3R2d6lIPVu3Zm/Zvqetqw6yf31YYwECQFB/54MLMLKbTsECqVcfh1EVYFNUZ5VGfaQLos4s4vJO2iWQ41znLyQsXGI+LnvtsgHMB/u5nyr+2WQ2fXU15JA="; //正式


    //panda_pay
    private string $pandapay_url = "https://novo.txzfpay.top/sys/zapi/withdraw";          //下单地址
    private string $pandapay_appkey   = "1843641620514967553-1861346220705533953";  // 正式环境
    private string $pandapay_Key    = '69448669046951478446690678118620'; //正式
    private string $pandapay_notifyUrl   = "pandapayNotify";

    //uper_pay
    private string $uperpay_url = "https://settle.upertecs.com/withdraw/singleOrder";          //下单地址
    private string $uperpay_marchantNo   = "26544125864";  // 正式环境
    private string $uperpay_Key    = 'A0A53D7030633D0963D5EF4251354CD9'; //正式
    private string $uperpay_notifyUrl   = "uperpaypayNotify";



    //six6_pay
    private string $six6pay_url = "http://15.206.97.107:9100/api/trade/paymentOut";          //下单地址
    private string $six6pay_marchantNo   = "MI162731473800286209";  // 正式
    private string $six6pay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCicCKMqFsQrVtUo1dxlR0ZyAQknCS0xO9e5KAM9u4i5X+pEXykxHlv4AjX188AE77WNiYgn5zBMEeCFJR3kCmOmTWgcAKAIB0DdWTK5cHRaQpAvlEORs9b+fKpXbbHvajfiYUaH5yxjE8NTxYO60p6FdBjsMjWeJ9TiUcEHD5QxdewJq3j8mQaDJDOMq2pjqxf9TOY4ALjqw/HhP8p7/KBJtcCmjfCXE39TMRW37V8ybPUqRAdGK4zoDMltliAG9bDtFuLopnigalPsdOLrGs2rm75kCJOqYoPlYbl8FMdZE0bIJQcEhIMEppcXD+9MwjckOBsGmXw1S7CvQyV4TmHAgMBAAECggEABBE8vDrm9NbyZ38jjGOIdAHPIL+MJ76ao8yjuU9hjRwkAy696T5GMCfy8LyloUHdUG3QrJZyjV/RGo+7W/cPI1PwxNCpL14ee9yvpmj0XnL7370kOHBLdukeS2FeV0gHd3lxDMNn4AY8YH/vdHYtyjrLmgNuM/iXPLc+QPsYEFupmzGZ0FnHb81HAl/oZCmh4pGyubqOLbX8liOcNUeCSqLk9Xr5Ge54FO9mCZGmBUZ3IhLd698l7dzglq7PvX+mWsYLO9Jbpq0hHkuj9KT+BZ+Doy7ZTbW3TnBnm81RhP0DeCikaLMwmtR1JcqQeuUt5v0Udv6fbsxLZEDCHL9GCQKBgQDasZAcjBl+XihCBjBaVTTQkE1VTRSGkXgYJoNYH4xRw81bsdMOl9NU6QumoymazwJVFARhFlGrJIfr7qgmvVfBigttdJlmAN9uy/aya0o1DJI/SFenOJAFFkFCOocXktwn3b+nM+AIAfq/L5IcHiReXHohGe1VE0nuCsZUDK4LVQKBgQC+Jd5T4sDAC/c2p7rBxKtI008OlxmoRbFwWu5BCD/QdCfHssIT9vcbzfpzgibNUEHsoXFcEu9KqZFEAfPDkx/V0nrofq9tcODRTXrRNXO8YvekHgjS/AtSF8tyWJXMk1c+zBp60NuQ+nuzgvKoTsTokCjtzE/xmWnWtSHgZMqJawKBgD/K3dvF7kXTV3Dy9zXSdwaDoVtJkbwzQNHiohuZkEflksi1lXhDR20UUca4/5Dd47NHlINxjD8c990Vj81FHA0jpHO4OGrtxD9AleSzsUDKOvrkslTgBfrF5CFaiz+QIlIquBYg5q/PTAJq8Pbsv/UairGPK5DOgJlEYVfxHu/FAoGAWs06nlRqN0t/gloWlPGV2fEOj6kYV4LwePbzT5rg3mqZlIOIqoAFAQIb140PenwY/ycZOx7PppfTBubnwT1AtpsMlnnozBpbQZf+Tml4Gz4ng/fTvu0detZiEPi8kDTMNPDCtGOIdnMnH1IpDraO0YAGC4jFpFnecOmOg9md3oECgYEAqzLEi6GKFA2eLnNAlihGZLpSIa3DqWEaRcay3LDo9q7J8fjboO6GgDB9jAwyYOI3k5gt9/4CRtzoEYXclrUmYxNOdi9D8II+hO1/x0GULBraqEraYiFWl4IbXLG2BhjH/fl5fgUp6q6lRmgs3Jsp/OsmTvpiD7oLQxf8PipHx0Y='; //正式
    private string $six6pay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA4ze6SVq6y8JQYURq+kWt/v+1JRVxuNel7wYexnkHk8Daarp4kQXhk+ZDvu8VmLUGNyU/mwIe8XVUcIs5gvKBGmq80pSF1f/8afNixlaDl/vKLmezeq0PAc7MCPGFZEvIXXZK1snI3FeDPAYfvliN1Jn74IQ98s/rDjegZ4yqd9QS8A4zG1CGyjqN7Zcjts19IwuPX0jo2SnJmFx8Vf3B5k2z8od1cRnPEBpInhlfprSM2KUjBjKBSdmOuX93Jr2JwSFYJNixUsw5JvCanNuZZXpIsOdsnc+kKfqk64CltMd9BmD2+wC/MuLcqgb4itNpgRMUq9dyeSTk0XHqgCoxkQIDAQAB'; //正式
    private string $six6pay_notifyUrl   = "six6payNotify";


    //mm_pay
    private string $mmpay_url = "https://api.mmpay.club/open/api/order/out";          //

    private string $mmpay_marchantNo   = "1000202";  // 正式

    private string $mmpay_Key    = 'MIICdwIBADANBgkqhkiG9w0BAQEFAASCAmEwggJdAgEAAoGBAM0bZtcW+NOoxccy+AtiAUOb9YRHrQ+Q7lq2RSMzngBRqj/vJJkV63M2DksywO6QDKkmFcHolEqmwYeUCKD07NkLaRHG0GN5rQxB1CHWr9M4tHktxd2pYl1P+GCTObO0bqrFjYTUTr8xd/NbAPA7OKyETxmJtGqsdBx6AZdR3oSdAgMBAAECgYAJAQPxu0tvF0Cfbwhej43YpvcPOIpLXaRpDQlZ80EjaHJd3iSwJ7svUpcsC+1WS7KSll5sJcakxE9IoWIDltzy0hYPhFnpIupUaVlgyxVUFJ1WAsHc8pg1l4MqNqNF4VtbQnQw2X8zEylHY9K7HznbB5vJ0c+Mdr+8oKx6fJSgjQJBAPamYi6psugdyxONK5TSoq9nfGu8M8aF25kvGd/WBEVUL0cqB31Eb2fZQneZVevSUrULhJhht6+r2pJW40FwSPMCQQDU4d1iGewGFX+splZnwmQ9XMU5o+UbcI4yOa8uw3jr1aUQol9hiSYF6vz1XkO8IyWgB+0R8k7Ehy2rarYbAmAvAkEA0f1N0dSAkMXswzSJSicagqNkdoTAv9/u2jgTm1ImSLAnoDrULX46Kvv5bsGJOUDTUXgA54sqS9HQQI7g5DGoqQJAPIPwcOC5jYkzABtQ2LIT2LW0gwwqJsC6S2DGgd6jUzcqcy4VOx7HpksEmaOwUZ0UJwfZxo5BAfEDdIUjO05TlQJBAPD0r4U4+vGaMTjG59mgzoGAchsFHPYhkJXL5NGrbDMrfZtNJyjJZHIII2VHJ2HgGB119wrAcf8/MusFw8j1VHc='; //正式
    private string $mmpay_notifyUrl   = "mmpayNotify";



    //fix_pay
    private string $fixpay_url = "https://agent.msigiosdfih.com/api/payout/order";          //下单地址
    private string $fixpay_marchantNo   = "777bet2";  // 正式环境
    private string $fixpay_Key    = '071AF48045745AA9F175C77D028486FD'; //正式
    private string $fixpay_notifyUrl   = "fixpayNotify";



    //dp_pay
    private string $dppay_url = "http://sub.dppay.net/api/subpaymenthw/subPaymentRSAInterface";          //下单地址
    private string $dppay_marchantNo   = "777bet";  // 正式环境
    private string $dppay_Key    = 'MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBALZpOE40a4opPqZfNoLVLeYtMCcmYPjDbbVcpfdcgVMowM2AV3KwPxZH86lXNf00AQ7w0sK4pGe6y/ogbZV3SkSjN2CXEHwJepisbv195kWPee8VMm1hc6F3vuqIwbcvbwXG0hCdQgwk8M8BSONcoKqzH0xAmPGG9vs9RXAmIO/1AgMBAAECgYABZPqGNoZf7wLImM+83k5UhSHqGrQBEtVi3otyQaXHcfdPWtzQRqKk0/X75GvIPL6JU7P4wxqWpGnsxpSv4NKTgnCs9ZdQRgGShgZ7ciJGI+8wD3KOV/VilxQ/pytKvmQxWK9Bs7dhXkvf/QDdd+EOTW/IRZLHJR7E87CDZef2/QJBAOUASjUXdfMszGTgUueJt/Pg6v738lNqe4BbkOuvE1RsBmXaY0qJtjOkoTrBTU7HShH04gF0u+AT218ojE7kN3cCQQDL6r9hUoOf1fVdA/NXp4bb0DROHv6fzZgwMGOeokT5s+4RdS4aeGuRns/RVce/6aLOFqLIkbPqYUyZZ3KzSIbzAkEAwNp1pDCVzK01lN618vgwStpoDUGSel16lKaIbXOLu9Udrjk01VkUcHl8rpaMHIQJBQZOLxu3/QW8AW+MegQIEQJAUzkEUHj3pTUSRZsGJoEFxhJsNnHp41hqQ0iMb8K0OeDYSaG0ZjM9W5ogIMRMmKOGwWt1ljv43LBHLdiNdGQmRwJAMHwOh54/Hm5yrSm1UTtydT1YIKR+0azqRezBX4FTbKJKmk3wKGYTrPLwEPVfsPFpiJXxZILn5if+7013iwcrKg=='; //正式

    private string $dppay_notifyUrl   = "dppayNotify";



    //lemontree_pay
    private string $lemontreepay_url = "https://api.lemontree.love/api/inr/payment";          //下单地址
    private string $lemontreepay_appKey   = "E210DFE25591B075A6";  //测试环境
    private string $lemontreepay_appSecret    = '76f26da08f44e2a15fd2682f7574594481fa25e0'; //测试环境
    private string $lemontreepay_notifyUrl   = "lemontreepayNotify";



    //zz_pay
    private string $zzpay_url = "https://api.zzpaycloud.com/payout/createOrder";          //下单地址
    private string $zzpay_appId   = "579512892064165888";  //测试环境
    private string $zzpay_appKey    = '1027ab9a-eeb5-4084-8680-51e1aad18fa2'; //测试环境
    private string $zzpay_notifyUrl   = "zzpayNotify";



    //s_pay
    private string $spay_url = "https://www.mars-pay.vip/api/order/draw";          //下单地址
    private string $spay_merchantNo   = "M2025020533";
    private string $spay_appKey    = 'ca00b66b73fca27b4986898caec94c06';
    private string $spay_notifyUrl   = "spayNotify";


    //ant2_pay
    private string $ant2pay_url = "https://asia.antpaytech.cn/api/addWithdraw";          //正式
    private string $ant2pay_merchantNo   = "1887712646760792064";
    private string $ant2pay_appKey    = '544af589-d142-41b3-b644-48aac57f7750';
    private string $ant2pay_notifyUrl   = "ant2payNotify";


    //aa_pay
    private string $aapay_url = "https://czfk.aaglbpay.com/payout/transfer";
    private string $aapay_merchantNo   = "100019032";  //正式
    private string $aapay_appKey    = 'ICZSUTCCEJOBOUVZ8OIGTIHCCDGVBOIE'; //正式
    private string $aapay_notifyUrl   = "aapayNotify";

    //peu_pay
    private string $peupay_url = "https://api.peupay.com/api/merchant/out/create";
    private string $peupay_appId   = "67d45dcd0b0a367f5535c79e";  //正式
    private string $peupay_appKey    = '5d0bbac7d2974cdcbabf97e637ecbdb7'; //正式
    private string $peupay_notifyUrl   = "peupayNotify";


    //fino_pay
    private string $finopay_url = "https://api.11pay.me/withdraw/order/create";
    private string $finopay_marchantNo   = "mrfJaoZIlz";  //正式
    private string $finopay_appKey    = '0d895b2e6ceb4e9ca4b82e4d2a4a51e2'; //正式
    private string $finopay_notifyUrl   = "finopayNotify";

    //ssbase_pay
    private string $ssbasepay_url = "http://pay-api.ssbase.net/interface/Withdraw.php";
    private string $ssbasepay_appid   = "860043";  //正式
    private string $ssbasepay_appKey    = '2f69c4eb3b4fa1d1b9eafa582e026425'; //正式
    private string $ssbasepay_notifyUrl   = "ssbasepayNotify";

    //ziptwo_pay
    private string $ziptwopay_url  = "https://zippay-api.com/payment/payout";                 //下单地址
    private string $ziptwopay_merchantNo = "716";
    private string $ziptwopay_notifyUrl  = "ziptwopayNotify";  //回调地址
    private string $ziptwopay_Key        = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAMzB0827WOH/BdcR5AZ+NkbPY0qMfpm9Y17peNHg4XzSWL/DAPH8kqsPnnKeL8oWLIUzT31Kkx4eIvSG50cSnwOsKqkgaZ8pKBdmn/EKe+2IekfRDM9UQJEcPRJIQ5fyrQG3gU8G+LytikG+s2usW8h0YczmhfuubGhpEayFLkBpAgMBAAECgYB+1k6y8av0ivp+KLn8/6/1m0BhjLhb2gK1Z6ENOeXUYaTSXSS3wgLE7m7zh2QJJkU72fYSoeCSVo7GtM6Nq05OZ3CZ6/Yef9z3XtBbdb54JDp/rL9G5NI/kuDjF0Yzq2rdz+2tY5YVPeopy2K9uszLw0ysqpyGzHhrwElLtWJFZQJBAOUQdGHlU4MU9dUXxehlVDoRm7Hl4KHMjo5yv0mmsvyHNhKUyAtR93LN2OPtqGV8vsionf3pzDpiGh3OzwyHBVcCQQDk1acI6dE9L56g0BKgutR9Kbin/xM+0KDZhWasml23He/Y/RDL5N2VMPtkwScIU39jcUveqH+IH4R2oGAHxZA/AkAJnmdEtRyMpJSuHhFxcM/YoGSpU73bDXvu/2KI9TcO456hqR29W/PIHly9NX2cxWA9jNcVknvA992g4s5O+FyBAkEA1pBmYHss0Fw4Nr0i2kaUOw/FrvADEaD5UTw+O5U6Thrp6+HNwADGq78T2TMq8CmqhomTBCGmAvLad4iEwoTCbQJASQXY9C7KFUN8C9mXxEe/gvr+VdmfKVQ/dGK+qmqdSXNJbFqXAOyX3KWwv5iyzniunI7PcPoozGhpmHmPPHqjJw==";//测试




    //qq_pay
    private string $qqpay_url = "http://api.qqpay.store/appclient/withdraw.do";
    private string $qqpay_appid   = "100592";  //正式
    private string $qqpay_appKey    = '11483737cfc74bbfb973c2e14a66fc8b'; //正式
    private string $qqpay_notifyUrl   = "qqpayNotify";




    //six6two_pay
    private string $six6twopay_url = "http://15.206.97.107:9100/api/trade/paymentOut";          //测试环境
    private string $six6twopay_marchantNo   = "MI162774139159023617";  // 正式
    private string $six6twopay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDx/6wV3dPHPyxmVmyZPEAy6asH0lNGcCGyaYk+kvJfn+8JsYIV4b2ENc0P6HuEFGBUy9NPHkX9PpnzJHlXi3rJ9WAlgYnNChu2WRg9EoAo7H1BM6FSHvyrfzmxWQXeCzofYk1IK6+h2ll0caw4TSE9zSaItKtHNfkZVRvrm1SMfRu6vYm46yCalSYknbRiy1tERAMlxkdPTioS6mQ7+ei4Y2eyOyYoyxYN/gsccbowXFZLOHxpecnp0bb0hh1loW42R0y1IjlDL3eDLoenhNdF+W9nk9P/4Y77Pv58rh3wCH/L1U/yCbZRynft42uvUtXKr/7YXzwF1KrNA5jED1BFAgMBAAECggEADi4BEeqZ+zmzpY8d/7rqImw9ggYRgetV7Mu7x7pEWuo2ugPtaiWnHT0qIJWVT9zXdH3ZShsX6+8+2zfG0g8hblODIyIhu61Xsy8pw9cBbO8ce2qlzXd02Sypf1TcH+cFrGtDZChGey6djBHmuYl6xOcFgWr1V+/CQo58ML7ngkVrjSz1NCLKm8dqsENu4nKWqWubkqQ18c3zcBac8jp9PKpqhHllRX4XZkYEPf5Jox8ZRvXGHmxXiVZZVtnrL120EzQl0uvqlbA3vyGXZDaQc4O4Z5nvkF0k5pUTbgnoLUJTpCDmFqC0GroYNJdL3UeosrsXq6vZg3VtU3ysB6oXgQKBgQD+mjhoXF0vIfl857QbXAMLky/p2+EhSp8wlBw8sytpykoOliMLqTcyT4NKshOMsrh9ddz8R2W0GCLXO7EKft5wbO7ZeiGPhqWYwTUxA6vRGDhtP8M0expTMdjT328z+C0t8UL2j9M5bY+J76OAqkKOLVa0LmMcts0RZmhPSY0HxQKBgQDzU72TdsPs//bsIUnO2wHnGsCwn9MINPHpnBcUDQqYyS2yUKvIr3PUsqV+fQ3rtZnSFdBQoGaKq9dwZPeJjsEeF40aSfVeUIEKlV/oLBB9YF6CqLkHfxYz/QtBqs5smrKIZ9UmYJ8GkinEk32i57fd0Cw6G56zbev/XCEQ+sUugQKBgFF8LFeCUDSYjA/k3GjxPuxCdFBFlj0gc+iJTqxCr79RBfi7JoZB5y+L8TpD2ivqu080HMEFXNCR9Pyr1xLD3g9fXeZuxzT3ZCKKm6qPQTtPpCebA6/VQmykBIBy/1VDtboBgGwHRhQYM5ty/gJc+6Yjbp+GRSRYgTNzcikGIkP9AoGAScYT7kfN82dP2Bvnot3n38fOsD5k31IeHnQC00N4+QXV4wBudPQtLEnVv1nvBI4UywtuE2PucxDSyvLx0jUD/DmrwFK4IBZMaYcMgvoJLdowDXFWWB2B/9UyuoAtAeSNSKoih/Y3gOiD3WPSbbfPmWLqZdvF7CThrpSiOeGuMwECgYEAsCJqjJ4rMxLLL4sjrSvyX8eKWFzJro/z5CnYVBEskc5znqLQyzI+5DqBcSftvxD7pBWz8OcGmekiP0+gvqzU6ZMIy18KHKwYgqm+6Xr18pETtFgcxaTAzld1xC7RRVLbXNqiXMFRPbZMCO850m3R4Tf3f0Xhir9P2gjoZPhp1RQ='; //正式
    private string $six6twopay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAhQXRl/loN/yneuHQ9/FWWANdl20e4fvxbLAajEUILVQ9RJci695qcAQkPk6+Oo/pWNrbBp0d0pNTWWYs1HaESXnvmpfck+kHjozlaWu/NrPU8zwfuTbdiVm8rX7lPrzIqwnBe9xNK+pBv1GlF+MQl2RKsaZho4KIjZaymlmok1L1hGqphpOxy3oy8FXwz7rKVcG8jpazINcJDvv0qGtTtZbSOmH9anfwmEmCd4ggFPB4X43R/SH1PnufNWotliP2wHx3HJ2cdnKw2BWnWGcfy2VvBNf3uTv0ItmjwTISs31MSg5mIoiRV01QengZv8cDBjl54h7KnadwKGdQOB/NNQIDAQAB'; //正式
    private string $six6twopay_notifyUrl   = "six6twopayNotify";



    //vendoo2_pay
    private string $vendoo2pay_url  = "https://api.cpi.seapay.ink/txi/v1/api/pay/out/order";                 //正式

    private string $vendoo2pay_merchantNo = "VD1026"; //正式

    private string $vendoo2pay_notifyUrl  = "vendoo2payNotify";  //回调地址

    private string $vendoo2pay_Key        = "022ff94ea0b497be26e7d093a368e0b7";//正式



    //show2_pay
    private string $show2pay_url = "https://uat-pf.aypaypro.com/open/payout"; //正式
    private string $show2pay_token_url = "https://uat-pf.aypaypro.com/auth/def/oauth/token"; //正式
    private string $show2pay_token_refresh_url = "https://uat-pf.aypaypro.com/auth/def/oauth/refresh_token"; //正式
    private string $show2pay_mchId      = "214"; //正式
    private string $show2pay_notifyUrl   = "show2payNotify";
    private string $show2pay_token_secret    = '~E5@M8tZ&cDl9'; //正式
    private string $show2pay_key = "MIIBSgIBADCCASsGByqGSM44BAEwggEeAoGBAMDpTtaDVjPXtEbAQh4iW1V8u/OUGVtzd0cqIGT5OQV2Yf0sBvFurytgjmfZoEnxN03OHcNa36ujlgjVwMLQAOgmVP8Q6tLK/8C2+/BpH5marAapuWC97hELyT0fO2vpxSNORPtXoog7u3iz4rnHGmzoHRtIX4e/4eNn+7JZMMuFAhUAis3RxINL2g90cIst6z6FGazvVcsCgYAAlkApPJqPBNL1JW88WBWukm1Ga9Y5uBet5Cq9av6UeHh/0XUs/4g9oYFJW8Q+mjkqdPsGLIAYvMagrGM+ojHLD/js2SCZyiT7RKEGLm9bNNFo2ZFinmAJD3H9QiC2c6HNKpHl10sTyQosjdVmtCgaS8RqpqLS8QWLv8IhVCdeHgQWAhQ3dfrFGPkX8SI90LHbTIx0eTU2QQ=="; //正式



    //six6three_pay
    private string $six6threepay_url = "http://15.206.97.107:9100/api/trade/paymentOut";          //测试环境
    private string $six6threepay_marchantNo   = "MI162779184218763265";  // 正式
    private string $six6threepay_Key    = 'MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQDCUXkZIKckaasMEPq4WI2Uv4xpofktXyrvCsJMpHH/DpDLP6jvEkCOTXPHOZv45UoAlsI3PMCln5VwXMTEX9M61O7z4ZX2oupCG135aixh6QV6niStGg+b0ZYr92tfNAPhMUUbNlwFjjsIXejpjZcr+8o20ScXGG0iontqAn4N+TBhQhNBOZ5O5bMUvpyL/WNtb0e2FqiRGkC202CIMYbhnGQeu54v+ann+RbktU/Nhbyu26qWyPWrAAyBNovpts+hlDjXN5AOreNo0ytqG7uCclkPFBObAZA2yb9dWXaMqvhkyvTB96yDGjnDZAWntF/puQyv9jV6cOeYGhsKSHyZAgMBAAECggEAAaIjb1KC0Sepukfcwaat5vuOs7cas/bOMrTvkesacbNGxIyYEA1iWUfdoqWxcc/Eldluj74NHP9Ix2liNofbK84NJaPmaaywJSbbfPyXW6nUo9WXN5TF35CND3jMkF/sreyG+Q31i07pIF6AthDcfdBHoHsU1ej8xtsgiDE168piCsf0vcawzZsCvLDBiQ3DzzL6JluA437GhB5x5jN3xh9TsSsUB5jihy86Azi8c4J5j9Bf+vDbJGVrIK36oXN2pCytzZEOablnXavZIiGFilkbV1HU8GbAbYkz24/dbAVfAqFh11OqOZbJiH2PM1n7hgbm84QyXzG/r1hZJSqiMQKBgQDxKT5z5sbVTvkM2GZtuo4B9YdigIoUtX5dzzwrMwPerEa8xK63sYGSueKNY9MXvT/1X7gwYfKOqw2HntN18I265kXcg87ZfmBpegoBkzB9ode6iTobWHxwXGvj/dgCkKVqPqXzcK3sSHb/Ycpjr4oO/i2xNV8I38yH7ZWLm7DHSQKBgQDORlz0HTIYRTIF7oIEu81u2H3WEQ5LA6wlaHN5k/oG9+MhKt9TCifec9nqmEtWrbqt5/FxHSewXZ4Lx8pmHG9iZCOs5dwWkj8k+J6d2pCK6Ady7pB7jLpMKGDPkvxR0qRbb614a3vMxkdj2B4amrsES7eD8msUBleE+VRonxV60QKBgCFKd0OarQIPR9QdH26wXSAqG8leQzF+qHYcwIqaHUOk9pLid9gF2gQ+QucPy7kwN98QmqWbL9fABzscksZqMbaGSUiarXhauMZ2wWDcR8pgCB7JCMtzmKIOMBqmFSatfxg+k7waZvgCPOMeRckjF2Tgc8BNxNO9yUdOZeGC2ZF5AoGAEG+e3HyvDywETmCwz3u/ZMOvUy1MvEFwqBJokRlvZLq/yFbIMK+weZM1m/HCnwd8xnqizGaMUQtEmp+yyuwdG/Pqu84c+Vdx3JpK2T0fI1JVtZy4un9+IK9e92s427QzEG4Xnm7CEJEEAzqnO2t012TJHKRmT9QpiRjs1uFGLuECgYEA5PLxe6YZjUeRvQBgSt98SoQK8/eoHAcCQurCtrtedSc8SpQo6lRKQyWv4fSi+ROSk7F7MGFu4U13WkhoVtkGlBmhoSiBmqauwdE5nQHVYeL/FOH0cNuYq7jb6mVZHALkTq31Foe6KMKzv1u0Nx2lDQAHqqCM0PKrAy6dPBX3hu0='; //正式
    private string $six6threepay_pub_Key    = 'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAnInjYIz+GjUN21BmlaZFasHbiC7bCmgXSl2+z946MjJsYpSJ6lpcHsvpGk2xQkBJ4MstHSAfu03liZlWPKjA+n7Z2VrDjoIjHG4b0oEIOE2djqnlnoRlT6sbPEUF4AfdQbbsiVvh2xXz3LS8pZl5UIAVXKDiqiLR60u0N0Fh6tg5xq+3Z/gxa/P3DevCeiYtGyrlL5VLgqT/+8FW9otPEZmDs0fnervsoD9YgEmGZVskIaQeJgNVr5zgSQD7ck5lKG9hsWFyv+jOlWb13u1Bt/24z6IkSI6jc65swDhtzJvTp8xSkH6F0JuQANPeTxOgnI7F81hD/wAZoQZvBrnR5wIDAQAB'; //正式
    private string $six6threepay_notifyUrl   = "six6threepayNotify";



    //leo_pay
    private string $leopay_url  = "https://settle.leopay.top/withdraw/singleOrder";
    private string $leopay_merchantNo = "15283158797";
    private string $leopay_notifyUrl  = "leopayNotify";
    private string $leopay_Key        = "8C74F42EA3BDBCBCF83FC08F04B3560B";


    private array $header = ["Content-Type" => "application/x-www-form-urlencoded"];


    private array $zr_header = ["Content-Type" => "application/json"];

    /**
     * @return void 统一提现接口
     * @param $paytype 提现渠道
     * @param $withdrawdata 创建提现订单信息
     */
    public function withdraw($withdrawdata,$withtype,$type){

        return $this->$withtype($withdrawdata,$type);
    }



    /**
     * rr_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public  function rr_pay($withdrawlog,$type) {
        $data = [
            "merchantId"      => $this->rrpay_merchantNo,
            "merchantOrderId" => $withdrawlog['ordersn'],
            "amount"          => bcdiv((string)$withdrawlog['really_money'],'100',2),
        ];
        $data['sign'] = Sign::notKsortSign($data,$this->rrpay_Key,'');

        $data["timestamp"]   = time() * 1000;
        $data["notifyUrl"]   = $this->getNotifyUrl($this->rrpay_notifyUrl);
        if($withdrawlog['type'] == 1){ //银行卡
            $data["fundAccount"] = [
                "accountType" => "bank_account",
                "contact"     => [
                    "name"          => $withdrawlog['backname'],
                ],
                "bankAccount" => [
                    "name"          => $withdrawlog['backname'],
                    "ifsc"          => $withdrawlog['ifsccode'],
                    "accountNumber" => $withdrawlog['bankaccount']
                ],
            ];
        }else{ //UIP
            $data["fundAccount"] = [
                "accountType" => "vpa",
                "contact"     => [
                    "name"          => $withdrawlog['backname'],
                ],
                "vpa" => [
                    "address"          => $withdrawlog['bankaccount'],
                ],
            ];
        }

        try {
            $response = $this->guzzle->post($this->rrpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == "0") {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['payoutId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * ser_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ser_pay($withdrawlog,$type){

        if($withdrawlog['type'] == 1){  //银行卡
            $data=array(
                "version"=>"2.1",
                "orgNo"=>$this->serpay_orgNo,
                "custId"=>$this->serpay_mchid,
                "custOrdNo"=>$withdrawlog['ordersn'],
                "casType"=>"00",
                "country"=>"IN",
                "currency"=>"INR",
                "casAmt"=>(int)$withdrawlog['really_money'],
                "deductWay"=>"02",
                "callBackUrl"=>$this->getNotifyUrl($this->serpay_backUrl),
                "account"=>$this->serpay_account,
                "payoutType"=>"Card",
                "cardType"=>"IMPS",
                "accountName"=>$withdrawlog['backname'],
                "payeeBankCode"=>substr($withdrawlog['ifsccode'], 0, 4),
                "cnapsCode"=>$withdrawlog['ifsccode'],
                "cardNo"=>$withdrawlog['bankaccount'],
                "phone"=>$withdrawlog['phone'],
                "email"=>$withdrawlog["email"]
            );
        }else{ //UPI
            $data=array(
                "version"=>"2.1",
                "orgNo"=>$this->serpay_orgNo,
                "custId"=>$this->serpay_mchid,
                "custOrdNo"=>$withdrawlog['ordersn'],
                "casType"=>"00",
                "country"=>"IN",
                "currency"=>"INR",
                "casAmt"=>(int)$withdrawlog['really_money'],
                "deductWay"=>"02",
                "callBackUrl"=>$this->getNotifyUrl($this->serpay_backUrl),
                "account"=>$this->serpay_account,
                "payoutType"=>"UPI",
                "accountName"=>$withdrawlog['backname'],
                "upiId"=>$withdrawlog['bankaccount'],
                "phone"=>$withdrawlog['phone'],
                "email"=>$withdrawlog["email"]
            );
        }

        $data['sign'] = Sign::asciiKeyStrtolowerSign($data, $this->serpay_key);


        try {
            $response = $this->guzzle->post($this->serpay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code']=="000000") {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['custId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }






    /**
     * sertwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function sertwo_pay($withdrawlog,$type){

        if($withdrawlog['type'] == 1){  //银行卡
            $data=array(
                "version"=>"2.1",
                "orgNo"=>$this->sertwopay_orgNo,
                "custId"=>$this->sertwopay_mchid,
                "custOrdNo"=>$withdrawlog['ordersn'],
                "casType"=>"00",
                "country"=>"IN",
                "currency"=>"INR",
                "casAmt"=>(int)$withdrawlog['really_money'],
                "deductWay"=>"02",
                "callBackUrl"=>$this->getNotifyUrl($this->sertwopay_backUrl),
                "account"=>$this->sertwopay_account,
                "payoutType"=>"Card",
                "cardType"=>"IMPS",
                "accountName"=>$withdrawlog['backname'],
                "payeeBankCode"=>substr($withdrawlog['ifsccode'], 0, 4),
                "cnapsCode"=>$withdrawlog['ifsccode'],
                "cardNo"=>$withdrawlog['bankaccount'],
                "phone"=>$withdrawlog['phone'],
                "email"=>$withdrawlog["email"]
            );
        }else{ //UPI
            $data=array(
                "version"=>"2.1",
                "orgNo"=>$this->sertwopay_orgNo,
                "custId"=>$this->sertwopay_mchid,
                "custOrdNo"=>$withdrawlog['ordersn'],
                "casType"=>"00",
                "country"=>"IN",
                "currency"=>"INR",
                "casAmt"=>(int)$withdrawlog['really_money'],
                "deductWay"=>"02",
                "callBackUrl"=>$this->getNotifyUrl($this->sertwopay_backUrl),
                "account"=>$this->sertwopay_account,
                "payoutType"=>"UPI",
                "accountName"=>$withdrawlog['backname'],
                "upiId"=>$withdrawlog['bankaccount'],
                "phone"=>$withdrawlog['phone'],
                "email"=>$withdrawlog["email"]
            );
        }

        $data['sign'] = Sign::asciiKeyStrtolowerSign($data, $this->sertwopay_key);


        try {
            $response = $this->guzzle->post($this->sertwopay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code']=="000000") {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['custId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * tm_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function tm_pay($withdrawlog,$type){

        $url    = $this->tmpay_url;
        $header = ["Content-Type" => "application/json;charset='utf-8'"];
        $data = [
            "mch_no"   => $this->tmpay_merchantNo,
            "app_id"   => $this->tmpay_appid,
            "mch_trade_no" => $withdrawlog['ordersn'],
            "type"   => $withdrawlog['type'] == 1 ? 1 : 3,
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "timestamp" => time().'000',
            "notify_url" => $this->getNotifyUrl($this->tmpay_notifyUrl),
            "cus_name" => $withdrawlog['backname'],
            "cus_email" => $withdrawlog['email'],
            "cus_mobile" => $withdrawlog['phone'],
            "card_holder" => $withdrawlog['backname'],
            "bank_code" =>$withdrawlog['type'] == 1 ? $withdrawlog['ifsccode'] : $withdrawlog['bankaccount'],
            "branch_code" =>$withdrawlog['type'] == 1 ? $withdrawlog['ifsccode'] : $withdrawlog['bankaccount'],
        ];
        if($withdrawlog['type'] == 1){
            $data['ifsc'] = $withdrawlog['ifsccode'];
            $data['card_no'] = $withdrawlog['bankaccount'];
        }else{
            $data['ifsc'] = $withdrawlog['bankaccount'];
            $data['upi_id'] = $withdrawlog['bankaccount'];
            $data['card_no'] = $withdrawlog['bankaccount'];
        }

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tmpay_Key,'app_key');


        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code'] == 0) {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['plat_trade_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * tmtwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function tmtwo_pay($withdrawlog,$type){
        $url    = $this->tmtwopay_url;
        $header = ["Content-Type" => "application/json;charset='utf-8'"];
        $data = [
            "mch_no"   => $this->tmtwopay_merchantNo,
            "app_id"   => $this->tmtwopay_appid,
            "mch_trade_no" => $withdrawlog['ordersn'],
            "type"   => $withdrawlog['type'] == 1 ? 1 : 3,
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "timestamp" => time().'000',
            "notify_url" => $this->getNotifyUrl($this->tmtwopay_notifyUrl),
            "cus_name" => $withdrawlog['backname'],
            "cus_email" => $withdrawlog['email'],
            "cus_mobile" => $withdrawlog['phone'],
            "card_holder" => $withdrawlog['backname'],
            "bank_code" =>$withdrawlog['type'] == 1 ? $withdrawlog['ifsccode'] : $withdrawlog['bankaccount'],
            "branch_code" =>$withdrawlog['type'] == 1 ? $withdrawlog['ifsccode'] : $withdrawlog['bankaccount'],
        ];
        if($withdrawlog['type'] == 1){
            $data['ifsc'] = $withdrawlog['ifsccode'];
            $data['card_no'] = $withdrawlog['bankaccount'];
        }else{
            $data['ifsc'] = $withdrawlog['bankaccount'];
            $data['upi_id'] = $withdrawlog['bankaccount'];
            $data['card_no'] = $withdrawlog['bankaccount'];
        }

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tmtwopay_Key,'app_key');


        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0) {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['plat_trade_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * waka_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function waka_pay($withdrawlog,$type){


        $url    = $this->wakapay_url;
        $header = $this->zr_header;
        $data = [
            "mer_no"   => $this->wakapay_merchantNo,
            "order_no" => $withdrawlog['ordersn'],
            "method" => 'fund.apply',
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "currency" => 'INR',
            "acc_no" => $withdrawlog['bankaccount'],
            "returnurl" => $this->getNotifyUrl($this->wakapay_notifyUrl),
            "acc_phone" => (string)$withdrawlog['phone'],
            "acc_email" => $withdrawlog['email'],
        ];
        if($withdrawlog['type'] == 1){
            $data['acc_code'] = 'BANK';
            $data['acc_name'] = $withdrawlog['backname'];
            $data['province'] = $withdrawlog['ifsccode'];
        }else{
            $data['acc_code'] = 'UPI';
            $data['acc_name'] = $withdrawlog['backname'];
        }

        $data['sign'] = Sign::asciiKeyStrtolowerNotSign($data,$this->wakapay_Key);


        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['status']) && $response['status'] == 'success') {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['sys_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];

    }

    /**
     * fun_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function fun_pay($withdrawlog,$type){

        $url    = $this->funpay_url;
        $header = $this->zr_header;
        $data = [
            "merchantId"   => $this->funpay_merchantNo,
            "orderId" => $withdrawlog['ordersn'],
            "amount" => $withdrawlog['really_money'],
            "address" => $withdrawlog['backname'],
            "email" => $withdrawlog['email'],
            "notifyUrl" => $this->getNotifyUrl($this->funpay_notifyUrl),
            "phone" => $withdrawlog['phone'],
            "userId" => $withdrawlog['uid'],
        ];

        if($withdrawlog['type'] == 1){
            $data['bankAccount'] = $withdrawlog['bankaccount'];
            $data['ifsc'] = $withdrawlog['ifsccode'];
            $data['userName'] =  $withdrawlog['backname'];
        }else{
            $data['vpa'] = $withdrawlog['bankaccount'];
            $data['userName'] = $withdrawlog['backname'];
        }

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->funpayKey);

        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code'] == 200) {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['tranId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];


    }



    /**
     * go_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function go_pay($withdrawlog,$type){

        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $url    = $this->gopay_url;
        $header = $this->zr_header;
        $data = [
            "amount" => $withdrawlog['really_money'],
            "currency" => "INR",
            "merId"   => $this->gopay_merchantNo,
            "notifyUrl" =>$this->getNotifyUrl($this->gopay_notifyUrl),
            "orderId" => $withdrawlog['ordersn'],
            "type" => 1,
            "bankCode" => $withdrawlog['ifsccode'],
            "account" => $withdrawlog['bankaccount'],
            "userName" => $withdrawlog['backname'],
            "email" => $withdrawlog['email'],
            "mobile" => $withdrawlog['phone'],
        ];


        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->gopayKey);


        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code'] == 200) {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * eanishop_pay
     *
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    private function eanishop_pay($withdrawlog,$type){
        $method = 'POST';
        $timestamp = time().'000';
        $nonce = Sign::createHex(16);
        $body = [
            'merchantTradeNo' =>$withdrawlog['ordersn'],
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'currency' => 'INR',
            'description' => '777WinWithDraw',
            'payoutMethod' => $withdrawlog['type'] == 1 ?
                [
                    'type' => 'BANK_ACCOUNT',
                    'mode' => 'IMPS',
                    'bankCode' => $withdrawlog['ifsccode'],
                    'bankName' => $withdrawlog['backname'],
                    'accountNumber' => $withdrawlog['bankaccount'],
                    'payeeName' =>  $withdrawlog['backname'],
                    'payeePhone' =>  $withdrawlog['phone'],
                    'payeeEmail' =>  $withdrawlog['email'],
                ]
                :
                [
                    'type' => 'UPI',
                    'vpa' => $withdrawlog['bankaccount'],
                    'payeeName' =>  $withdrawlog['backname']
                ],
            'notifyUrl' =>$this->getNotifyUrl($this->eanishoppay_notifyUrl),
        ];
        $sign = Sign::EaniShopSign($this->eanishoppayAppId, $this->eanishoppayAppSecret, $method, $this->eanishoppay_url, $timestamp, $nonce, json_encode($body));
        $Authorization  =  "V2_SHA256 appId=$this->eanishoppayAppId,sign=$sign,timestamp=$timestamp,nonce=$nonce";
        // $herder = [
        //     'Content-Type' => 'application/json',
        //     'Authorization' => $Authorization,
        // ];



        // try {
        //     $response = $this->guzzle->post($this->eanishoppay_url,$body,$herder);
        // }catch (\Exception $e){
        //     $response = ['Request timed out'];
        // }
        $herder = [
            'Content-Type: application/json',
            'Authorization:'. $Authorization,
        ];
        $response = Curl::post($this->eanishoppay_url,$body,$herder);
        // $this->logger->error('response'.$response);
        $response = json_decode($response,true);



        if (isset($response['code']) && $response['code'] == 'OK') {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['payoutNo']];
        }
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * 24hrpay
     *
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    private function hr24_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $body = [
            'mchId' => $this->hr24pay_mchId,
            'accountName' => $withdrawlog['backname'],
            'accountNo' => $withdrawlog['bankaccount'],
            'cciNumber' => $withdrawlog['ifsccode'],
            'phone' => $withdrawlog['phone'],
            'amount' => $withdrawlog['really_money'],
            'mchOrderNo' => $withdrawlog['ordersn'],
            'notifyUrl' => $this->getNotifyUrl($this->hr24pay_notifyUrl),
            'nonceStr' => (string)time(),
        ];

        $body['sign'] = Sign::asciiKeyStrtoupperSign($body, $this->hr24pay_appKey);
        // $herder = $this->zr_header;
        // $herder['tmId'] = '24hr_ind_auto';

        $herder = array(
            "Content-Type: application/json",
            "tmId: 24hr_ind_auto",
        );
        try {
            // $response = $this->guzzle->post($this->hr24pay_url,$body,$herder);
            $response = Curl::post($this->hr24pay_url,$body,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['resCode']) && $response['resCode'] == 'SUCCESS') {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['orderId']];
        }
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }






    /**
     * ai_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ai_pay($withdrawlog,$type){



        $url    = $this->aipay_url;
        $header = $this->zr_header;
        $data = [
            "mer_no"   => $this->aipay_merchantNo,
            "order_no" => $withdrawlog['ordersn'],
            "method" => 'fund.apply',
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "currency" => 'INR',
            "acc_no" => $withdrawlog['bankaccount'],
            "returnurl" => $this->getNotifyUrl($this->aipay_notifyUrl),
            "acc_phone" => (string)$withdrawlog['phone'],
            "acc_email" => $withdrawlog['email'],
        ];
        if($withdrawlog['type'] == 1){
            $data['acc_code'] = 'BANK';
            $data['acc_name'] = $withdrawlog['backname'];
            $data['province'] = $withdrawlog['ifsccode'];
        }else{
            $data['acc_code'] = 'UPI';
            $data['acc_name'] = $withdrawlog['backname'];
        }
        $data['sign'] = Sign::asciiKeyStrtolowerNotSign($data,$this->aipay_Key);



        try {
            $response = $this->guzzle->post($url,$data,$header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['status']) && $response['status'] == 'success') {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['sys_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];

    }



    /**
     * x_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function x_pay($withdrawlog,$type){
        $data['mchNo'] = $this->xpay_mchNo;
        $data['appId'] = $this->xpay_appId;
        $data['mchOrderNo'] = $withdrawlog['ordersn'];
        $data['currency'] = 'INR';
        $data['orderAmount'] = bcdiv((string)$withdrawlog['really_money'],'100',2);
        if($withdrawlog['type'] == 1) {  //银行卡
            $data['bankCode'] ='BANK';
            $data['bankName'] = $withdrawlog['backname'];
            $data['accountNo'] = $withdrawlog['bankaccount'];
            $data['ifsc'] = $withdrawlog['ifsccode'];
        }else{
            $data['bankCode'] = 'UPI';
            $data['vpa'] = $withdrawlog['bankaccount'];
        }
        $data['accountName'] =   $withdrawlog['backname'];
        $data['accountEmail'] = $withdrawlog['email'];
        $data['accountMobileNo'] = $withdrawlog['phone'];
        $data['notifyUrl'] = $this->getNotifyUrl($this->xpay_notifyUrl);
        $data['reqTime'] =  time()."000";
        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->xpay_Key);

        try {
            $response = $this->guzzle->post($this->xpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']=="0" && ($response['data']['state'] == 1 || $response['data']['state'] == 2)){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['transferId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * lets_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function lets_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            'type' => 'api',
            'mchId' => $this->letspay_mchId,
            'mchTransNo' => $withdrawlog['ordersn'],
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->letspay_notifyUrl),
            'accountName' => $withdrawlog['backname'],
            'accountNo' => $withdrawlog['bankaccount'],
            'bankCode' => $withdrawlog['ifsccode'],
            'remarkInfo' => 'email:'.$withdrawlog['email'].'/name:'.$withdrawlog['backname'].'/phone:'.$withdrawlog['phone'].'/mode:bank',
        ];


        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->letspay_Key);

        try {
            $response = $this->guzzle->post($this->letspay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['retCode']=="SUCCESS"){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['platOrder']];
        }
        $status = Db::table('withdraw_log')->where('ordersn',$withdrawlog['ordersn'])->value('status');
        if($status && !in_array($status,[0,3]))return ['code' => 201 , 'msg' => '' , 'data' => []];
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * letstwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function letstwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            'type' => 'api',
            'mchId' => $this->letstwopay_mchId,
            'mchTransNo' => $withdrawlog['ordersn'],
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->letstwopay_notifyUrl),
            'accountName' => $withdrawlog['backname'],
            'accountNo' => $withdrawlog['bankaccount'],
            'bankCode' => $withdrawlog['ifsccode'],
            'remarkInfo' => 'email:'.$withdrawlog['email'].'/name:'.$withdrawlog['backname'].'/phone:'.$withdrawlog['phone'].'/mode:bank',
        ];


        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->letstwopay_Key);

        try {
            $response = $this->guzzle->post($this->letstwopay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['retCode']=="SUCCESS"){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['platOrder']];
        }
        $status = Db::table('withdraw_log')->where('ordersn',$withdrawlog['ordersn'])->value('status');
        if($status && !in_array($status,[0,3]))return ['code' => 201 , 'msg' => '' , 'data' => []];
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * ant_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ant_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            "merchant_code" => $this->antpay_merchant_code,
            "order_no" => $withdrawlog['ordersn'],
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "bank_card" => $withdrawlog['bankaccount'],
            "user_name" => $withdrawlog['backname'],
            "notify_url" => $this->getNotifyUrl($this->antpay_notifyUrl),
        ];
        if($withdrawlog['type'] == 1){
            $data['pay_type'] = 'india-bank-repay';
            $data['bank_name'] = 'BANK';
            $data['bank_branch'] = $withdrawlog['ifsccode'];
        }else{
            $data['pay_type'] = 'india-upi-repay';
        }
        //$this->logger->error('ant_pay提现数据:'.json_encode($data));

        $sign = Sign::asciiKeyStrtoupperSign($data,$this->antpay_key);

        $new_data = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        try {
            $response = $this->guzzle->post($this->antpay_url,$new_data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['status']==true){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * ff_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ff_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            'sign_type' => 'MD5',
            'mch_id' => $this->ffpay_mchId,
            'mch_transferId' => $withdrawlog['ordersn'],
            'transfer_amount' => bcdiv((string)$withdrawlog['really_money'],'100',0),
            'apply_date' => date('Y-m-d H:i:s'),
            'bank_code' => 'IDPT0001',
            'receive_name' => $withdrawlog['backname'],
            'receive_account' => $withdrawlog['bankaccount'],
            'remark' => $withdrawlog['ifsccode'],
            'back_url' => $this->getNotifyUrl($this->ffpay_notifyUrl),
        ];


        $data['sign'] = Sign::FfPaySign($data,$this->ffpay_key);

        try {
            $response = $this->guzzle->post($this->ffpay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['respCode']=="SUCCESS"){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['tradeNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * cow_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function cow_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            "merchant_code" => $this->cowpay_mchId,
            "order_no" => $withdrawlog['ordersn'],
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "bank_card" => $withdrawlog['bankaccount'],
            "bank_branch" => $withdrawlog['ifsccode'],
            "user_name" => $withdrawlog['backname'],
            "notify_url" => $this->getNotifyUrl($this->cowpay_notifyUrl),
        ];

        if($withdrawlog['type'] == 1){
            $data["pay_type"] = 'india-bank-repay';
            $data["bank_branch"] =  $withdrawlog['ifsccode'];
            $data["bank_name"] =  $withdrawlog['backname'];
        }else{
            $data["pay_type"] = 'india-upi-repay';
        }

        $sign = Sign::asciiKeyStrtoupperSign($data,$this->cowpay_key);

        $body = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        try {
            $response = $this->guzzle->post($this->cowpay_url,$body,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['status']==true){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * cowtwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function cowtwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            "merchant_code" => $this->cowtwopay_mchId,
            "order_no" => $withdrawlog['ordersn'],
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "bank_card" => $withdrawlog['bankaccount'],
            "bank_branch" => $withdrawlog['ifsccode'],
            "user_name" => $withdrawlog['backname'],
            "notify_url" => $this->getNotifyUrl($this->cowtwopay_notifyUrl),
        ];

        if($withdrawlog['type'] == 1){
            $data["pay_type"] = 'india-bank-repay';
            $data["bank_branch"] =  $withdrawlog['ifsccode'];
            $data["bank_name"] =  $withdrawlog['backname'];
        }else{
            $data["pay_type"] = 'india-upi-repay';
        }

        $sign = Sign::asciiKeyStrtoupperSign($data,$this->cowtwopay_key);

        $body = [
            'signtype' => 'MD5',
            'sign' => urlencode($sign),
            'transdata' => urlencode(json_encode($data)),
        ];

        try {
            $response = $this->guzzle->post($this->cowtwopay_url,$body,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['status']==true){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * wdd_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function wdd_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            "userID" => (int)$this->wddpay_mchId,
            "amount" => (int)bcdiv((string)$withdrawlog['really_money'],'100',0),
            "payeeName" => $withdrawlog['backname'],
            "payeePhone" => $withdrawlog['phone'],
            "payType" => 1,
            'bankCardOwnerName' => $withdrawlog['backname'],
            "bankCardName" => $withdrawlog['ifsccode'],
            "accountNo" => $withdrawlog['bankaccount'],
            "stamp" => time(),
            "orderID" => $withdrawlog['ordersn'],
            'channelcode' => 704,
            "notifyUrl" => $this->getNotifyUrl($this->wddpay_notifyUrl),
        ];

        $signData = [
            "userID" => $data['userID'],
            "amount" => $data['amount'],
            "payeeName" => $data['payeeName'],
            "payeePhone" => $data['payeePhone'],
            "payType" => $data['payType'],
            "stamp" => $data['stamp'],
            "orderID" => $data['orderID'],
            "notifyUrl" => $data['notifyUrl'],
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($signData,$this->wddpay_key);



//         try {
//             $response = $this->guzzle->post($this->wddpay_url,$data,$this->zr_header);
// //            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->header);
//         }catch (\Exception $e){
//             $response = ['Request timed out'];
//         }


        $zr_herder = ['Content-Type: application/json'];
        $response = Curl::post($this->wddpay_url,$data,$zr_herder);

        $response = json_decode($response,true);

        if ($response['code']== '0'){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * timi_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function timi_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }


        $data = [
            "mch_id"   => $this->timipay_mchId,
            "out_trade_no" => $withdrawlog['ordersn'],
            "account_code" =>  'IFSC',
            "account_name" => $withdrawlog['backname'],
            "agent_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "currency" => "INR",
            "extra" => json_encode([
                'account_num' => $withdrawlog['bankaccount'],
                'ifsc_num' => $withdrawlog['ifsccode'],
                'email' =>  $withdrawlog['email'],
                'mobile' =>  $withdrawlog['phone'],
            ]),
            "notify_url" => $this->getNotifyUrl($this->timipay_notifyUrl),
            "nonce_str" => (string)time(),
        ];


        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->timipay_key);


        try {
            $response = $this->guzzle->post($this->timipay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['status']==200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['order_id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * newfun_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function newfun_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }


        $data = [
            "merchant"   => $this->newfunpay_mchId,
            "orderNo" => $withdrawlog['ordersn'],
            "businessCode" => '102',
            "accNo" => $withdrawlog['bankaccount'],
            "accName" => $withdrawlog['backname'],
            "orderAmount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "bankCode" => 'BANK',
            'phone' =>  $withdrawlog['phone'],
            'province' =>  $withdrawlog['ifsccode'],
            'notifyUrl' => $this->getNotifyUrl($this->newfunpay_notifyUrl),
            'remake' => 'Withdraw',
        ];


        $data['sign'] = Sign::newFunPaySing($data,$this->newfunpay_key);


        try {
            $response = $this->guzzle->post($this->newfunpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * simply_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function simply_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }


        $body = [
            'appId' => $this->simplypay_appId,
            "merOrderNo" => $withdrawlog['ordersn'],
            "currency" => 'INR',
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->simplypay_notifyUrl),
            "extra" => [
                'payoutType' => 'IFSC',
                'ifsc' => $withdrawlog['ifsccode'],
                'account' => $withdrawlog['bankaccount'],
                'name' => $withdrawlog['backname'],
                'email' => $withdrawlog['email'],
                'mobile' => $withdrawlog['phone'],
            ],
        ];


        $data = $body;
        $body['extra'] = Sign::dataString($body['extra']);
        $data['sign'] = hash('sha256', Sign::dataString($body).'&key='.$this->simplypay_key);


        try {
            $response = $this->guzzle->post($this->simplypay_url,$data,$this->zr_header);

//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * simplytwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function simplytwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }


        $body = [
            'appId' => $this->simplytwopay_appId,
            "merOrderNo" => $withdrawlog['ordersn'],
            "currency" => 'INR',
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->simplytwopay_notifyUrl),
            "extra" => [
                'payoutType' => 'IFSC',
                'ifsc' => $withdrawlog['ifsccode'],
                'account' => $withdrawlog['bankaccount'],
                'name' => $withdrawlog['backname'],
                'email' => $withdrawlog['email'],
                'mobile' => $withdrawlog['phone'],
            ],
            'attach' => 'Withdraw'
        ];


        $data = $body;
        $body['extra'] = Sign::dataString($body['extra']);
        $data['sign'] = hash('sha256', Sign::dataString($body).'&key='.$this->simplytwopay_key);


        try {
            $response = $this->guzzle->post($this->simplytwopay_url,$data,$this->zr_header);

//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * lq_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function lq_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "amount" => (string)$withdrawlog['really_money'],
            'deptId' => $this->lqpay_deptId,
            "merchantNo" => $this->lqpay_mchId,
            "orderId" => $withdrawlog['ordersn'],
            'toUser' => $withdrawlog['backname'],
            'toNumber' => $withdrawlog['bankaccount'],
            'toBank' =>  $withdrawlog['backname'],
            'toIsfc' =>  $withdrawlog['ifsccode'],
            'notifyUrl' =>   $this->getNotifyUrl($this->lqpay_notifyUrl),
            'callbackUrl' => config('host.gameurl'),
        ];

        $SignStr = Sign::dataNotEqualString($data);

        $data['signature'] = Sign::md5WithRsaSign($SignStr,$this->lqpay_key);

        try {
            $response = $this->guzzle->post($this->lqpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * threeq_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function threeq_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchNo"   => $this->threeqpay_mchId,
            "appId"   => $this->threeqpay_appId,
            "mchOrderNo" => $withdrawlog['ordersn'],
            "amount" => $withdrawlog['really_money'],
            "entryType" => 'IMPS',
            'accountNo' => $withdrawlog['bankaccount'],
            'accountCode' =>  $withdrawlog['ifsccode'],
            'bankName' =>  $withdrawlog['backname'],
            'accountName' =>  $withdrawlog['backname'],
            'accountEmail' =>  $withdrawlog['email'],
            'accountPhone' =>  $withdrawlog['phone'],
            'notifyUrl' => $this->getNotifyUrl($this->threeqpay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->threeqpay_key);

        try {
            $response = $this->guzzle->post($this->threeqpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['transferId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * show_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function show_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchant_id"   => $this->showpay_mchId,
            "order_number" => $withdrawlog['ordersn'],
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',0),
            "type" => 'BANK',
            'email' =>  $withdrawlog['email'],
            'account' => $withdrawlog['bankaccount'],
            'name' =>  $withdrawlog['backname'],
            'ifsc' =>  $withdrawlog['ifsccode'],
            'phone' =>  $withdrawlog['phone'],
            'notify_url' => $this->getNotifyUrl($this->showpay_notifyUrl),
        ];

        $data['sign'] = Sign::showWithdrawSign($data,$this->showpay_key);

        try {
            $response = $this->guzzle->post($this->showpay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==100){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['plat_number']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * g_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function g_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo"   => $this->gpay_mchId,
            "orderNo" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "type" => '1',
            'notifyUrl' => $this->getNotifyUrl($this->gpay_notifyUrl),
            'ext' =>  'Withdraw',
            'version' =>  '2.0.2',
            'name' =>  $withdrawlog['backname'],
            'account' => $withdrawlog['bankaccount'],
            'ifscCode' =>  $withdrawlog['ifsccode'],
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->gpay_key);
        try {
//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->header);
            $response = $this->guzzle->post($this->gpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']=='0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['platformOrderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * tata_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function tata_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantCode"   => (int)$this->tatapay_mchId,
            "orderNo" => $withdrawlog['ordersn'],
            "amount" => (int)$withdrawlog['really_money'],
            'notifyUrl' => $this->getNotifyUrl($this->tatapay_notifyUrl),
            'currency' => 'INR',
            "payType" => 1,
            'accNo' => $withdrawlog['bankaccount'],
            'accName' =>  $withdrawlog['backname'],
            'bankCode' =>  $withdrawlog['ifsccode'],
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'version' =>  '2.0',
            'sign_type' =>  'MD5',
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tatapay_key);
        try {
//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->header);
            $response = $this->guzzle->post($this->tatapay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']=='0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * pay_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function pay_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "payAmount"   => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "merId"   => $this->paypay_mchId,
            "merOrderNo"   => $withdrawlog['ordersn'],
            "payType"   => 'IMPS',
            "userBankAccount"   => $withdrawlog['bankaccount'],
            "ifscCode"   => $withdrawlog['ifsccode'],
            "userName"   => $withdrawlog['backname'],
            "notifyUrl"   => $this->getNotifyUrl($this->paypay_notifyUrl),
            "createOrderTime"   => (string)time(),
        ];

        $data['sign'] = Sign::asciiKeyStrtolowerSign($data,$this->paypay_key);
        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->header);
            $response = $this->guzzle->post($this->paypay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']=='0000'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * yh_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function yh_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchNo"   => $this->yhpay_mchId,
            "orderNum"   => $withdrawlog['ordersn'],
            "bankTypeCode"   => 'IMPS',
            "bankCode"   => $withdrawlog['ifsccode'],
            "bankAccountName"   => $withdrawlog['backname'],
            "bankAccountNo"   => $withdrawlog['bankaccount'],
            "bankName"   => $withdrawlog['backname'],
            'phoneNo' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'currencyCode' =>  'INR',
            "amount"   => (string)$withdrawlog['really_money'],
            "callBackUrl"   => $this->getNotifyUrl($this->yhpay_notifyUrl) ,
            "charset"   => 'UTF-8',
        ];

        ksort($data);
        //JSON_UNESCAPED_SLASHES使用 JSON_UNESCAPED_SLASHES 标志：
        //在调用 json_encode 时，传递一个选项标志 JSON_UNESCAPED_SLASHES，这样它就不会转义斜杠了。
        $SignStr = json_encode($data,JSON_UNESCAPED_SLASHES).$this->yhpay_key;
        $data['sign'] = strtoupper(md5($SignStr));
        try {
            $response = $this->guzzle->post($this->yhpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '200' ) {
            $responseData = json_decode($response['data'],true);
            return ['code' => 200 , 'msg' => '' , 'data' => $responseData['orderNum']];

        }


        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * newai_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function newai_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchNo"   => $this->newaipay_merchantNo,
            "appId"   => $this->newaipay_appid,
            "mchOrderNo" => $withdrawlog['ordersn'],
            "amount" => (int)$withdrawlog['really_money'],
            "entryType" => 'IMPS',
            'accountNo' => $withdrawlog['bankaccount'],
            'accountCode' =>  $withdrawlog['ifsccode'],
            'bankName' =>  $withdrawlog['backname'],
            'accountName' =>  $withdrawlog['backname'],
            'accountEmail' =>  $withdrawlog['email'],
            'accountPhone' =>  $withdrawlog['phone'],
            'notifyUrl' => $this->getNotifyUrl($this->newaipay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->newaipay_Key);
        try {
//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdraw',$data,$this->header);
            $response = $this->guzzle->post($this->newaipay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']=='0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['transferId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * make_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function make_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "orderId" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'accountUser' => $withdrawlog['backname'],
            'accountNo' => $withdrawlog['bankaccount'],
            'accountBank' => 'NA',
            'accountIfsc' =>  $withdrawlog['ifsccode'],
            'notifyUrl' =>  $this->getNotifyUrl($this->makepay_notifyUrl),
            'callbackUrl' => $this->getNotifyUrl($this->makepay_notifyUrl),
            'memo' => 'NA',
        ];


        $SignStr = json_encode($data).$this->makepay_Key;
        $sign = md5($SignStr);

        $herder = array(
            "Content-Type: application/json",
            "x-app-key: ".$this->makepay_appkey,
            "x-sign: ".$sign,
        );

        try {
            $response = Curl::post($this->makepay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * rrtwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public  function rrtwo_pay($withdrawlog,$type) {
        $data = [
            "merchantId"      => $this->rrtwopay_merchantNo,
            "merchantOrderId" => $withdrawlog['ordersn'],
            "amount"          => bcdiv((string)$withdrawlog['really_money'],'100',2),
        ];
        $data['sign'] = Sign::notKsortSign($data,$this->rrtwopay_Key,'');

        $data["timestamp"]   = time() * 1000;
        $data["notifyUrl"]   = $this->getNotifyUrl($this->rrtwopay_notifyUrl);
        if($withdrawlog['type'] == 1){ //银行卡
            $data["fundAccount"] = [
                "accountType" => "bank_account",
                "contact"     => [
                    "name"          => $withdrawlog['backname'],
                ],
                "bankAccount" => [
                    "name"          => $withdrawlog['backname'],
                    "ifsc"          => $withdrawlog['ifsccode'],
                    "accountNumber" => $withdrawlog['bankaccount']
                ],
            ];
        }else{ //UIP
            $data["fundAccount"] = [
                "accountType" => "vpa",
                "contact"     => [
                    "name"          => $withdrawlog['backname'],
                ],
                "vpa" => [
                    "address"          => $withdrawlog['bankaccount'],
                ],
            ];
        }

        try {
            $response = $this->guzzle->post($this->rrtwopay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }


        if (isset($response['code']) && $response['code'] == "0") {
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['payoutId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * best_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function best_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantId"      => (int)$this->bestpay_merchantNo,
            "merchantOrderId" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'currency' =>  'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            "timestamp"  => time().'000',
            'account' => $withdrawlog['bankaccount'],
            'accountName' =>  $withdrawlog['backname'],
            'address' => $withdrawlog['backname'],
            'subBranch' =>  $withdrawlog['ifsccode'],
            'withdrawType' => 1,
            'bankName' => $withdrawlog['backname'],
            'remark' => 'WithDraw',
            'notifyUrl' => $this->getNotifyUrl($this->bestpay_notifyUrl),
        ];

        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        $data['sign'] = Sign::bestPaySign($dataSign,$this->bestpay_Key);

        try {
            $response = $this->guzzle->post($this->bestpay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200 && isset($response['data']['platformOrderId'])){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platformOrderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * zip_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function zip_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantId"      => (int)$this->zippay_merchantNo,
            "merchantOrderId" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'currency' =>  'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            "timestamp"  => time().'000',
            'account' => $withdrawlog['bankaccount'],
            'accountName' =>  $withdrawlog['backname'],
            'address' => $withdrawlog['backname'],
            'subBranch' =>  $withdrawlog['ifsccode'],
            'withdrawType' => 1,
            'bankName' => $withdrawlog['backname'],
            'remark' => 'WithDraw',
            'notifyUrl' => $this->getNotifyUrl($this->zippay_notifyUrl)
        ];

        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        $data['sign'] = Sign::zipPaySign($dataSign,$this->zippay_Key);

        try {
            $response = $this->guzzle->post($this->zippay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200 && isset($response['data']['platformOrderId'])){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platformOrderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * upi_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function upi_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "amount" => $withdrawlog['really_money'],
            "merchantId" => $this->upipay_merchantNo,
            "orderId" => $withdrawlog['ordersn'],
            'notifyUrl' => $this->getNotifyUrl($this->upipay_notifyUrl) ,
            'outType' => 'IMPS',
            'accountNumber' => $withdrawlog['bankaccount'],
            'ifsc' =>  $withdrawlog['ifsccode'],
            'accountHolder' => $withdrawlog['backname'],
        ];

        $timestamp = time().'000';

        $dataSign = $data['amount'] . $data['merchantId'] . $data['orderId'] . $timestamp . $this->upipay_Key;

        $sign = md5($dataSign);

        $herder = array(
            "Content-Type: application/json",
            "X-TIMESTAMP: ".$timestamp,
            "X-SIGN: ".$sign,
        );


        try {
            $response = Curl::post($this->upipay_url,$data,$herder);

            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 100){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['payOrderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * q_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function q_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        //获取accesstoken
        $accessTokenData = [
            "merchant_id"   => $this->securitypay_appid,
            "sec_key"   => md5(md5($this->securitypay_Key)),
        ];

        $tokenNonce = time().rand(111,222);
        $tokenTimeStamp = time().'000';

        $tokenSignStr = 'host='.$this->securitypay_host."&uri=/v1.0/api/access-token&method=POST&nonce=$tokenNonce&timestamp=$tokenTimeStamp&";
        $accessTokenUrl = $this->securitypay_tokne_url.'?nonce='.$tokenNonce.'&timestamp='.$tokenTimeStamp.'&sign='.md5($tokenSignStr);

        try {
//            $responseTokenArray = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/sign',['data' => $accessTokenData,'url' => $accessTokenUrl],$this->header);
//            $responseToken = $responseTokenArray['response'];
//            $Authorization = $responseTokenArray['Authorization'];

            [$responseTokenStr,$Authorization] = Curl::postHerderAndBody($accessTokenUrl,$accessTokenData,["Content-Type: application/json"],1,'authorization');
            $responseToken = json_decode($responseTokenStr,true);

        }catch (\Exception $e){
            $this->logger->error('Error'.$e->getMessage());
            $responseToken = [];
        }

        if(isset($responseToken['expire_at']) && $responseToken['expire_at']){
            //代付下单
            $data = [
                "client_order_no" => $withdrawlog['ordersn'],
                "user_no" => $withdrawlog['uid'],
                "notify_url" =>  $this->getNotifyUrl($this->securitypay_notifyUrl) ,
                "pay_amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
                "pay_currency" => 'INR',
                "receive_currency" => 'INR',
                "receiver_account_no" => $withdrawlog['bankaccount'],
                "name" => $withdrawlog['backname'],
                "ifsc" => $withdrawlog['ifsccode'],
            ];
            $Nonce = time().rand(111,222);
            $SignStr = 'host='.$this->securitypay_host."&uri=/v1.0/api/orders&method=POST&nonce=$Nonce&timestamp=$tokenTimeStamp&xpt=".$Authorization.'&';
            $Url = $this->securitypay_url.'?xpt='.$Authorization.'&nonce='.$Nonce.'&timestamp='.$tokenTimeStamp.'&sign='.md5($SignStr);

            try {
//                $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/withdrawNew',['data' => $data,'url' => $Url],$this->header);

                $response = $this->guzzle->post($Url,$data,$this->zr_header);

                if (isset($response['order_no']) && $response['order_no']){
                    return ['code' => 200 , 'msg' => '' , 'data' => $response['order_no']];
                }
            }catch (\Exception $e){
                $response = ['Request timed out'];
            }
        }



        $info = $response ?? $responseToken;

        Common::log($withdrawlog['ordersn'],$info,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$info); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * vendoo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function vendoo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchNo"      => $this->vendoopay_merchantNo,
            "mchOrderNo" => $withdrawlog['ordersn'],
            'currency' =>  'INR',
            "method" => 'IMPS',
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'name' =>  $withdrawlog['backname'],
            'email' =>  $withdrawlog['email'],
            'phone' =>  $withdrawlog['phone'],
            'notifyUrl' => $this->getNotifyUrl($this->vendoopay_notifyUrl) ,
            'productNo' => '191001',
            'withdrawParam' => json_encode([
                'bankCode' => $withdrawlog['ifsccode'],
                'accountName' => $withdrawlog['backname'],
                'accountNumber' => $withdrawlog['bankaccount'],
            ]),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->vendoopay_Key);



        try {
            $response = $this->guzzle->post($this->vendoopay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * rupeelink_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function rupeelink_pay($withdrawlog,$type){


        $data = [
            "userCode"      => $this->rupeelinkpay_merchantNo,
            "orderCode" => $withdrawlog['ordersn'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "address"  =>  $withdrawlog['bankaccount'],
            "callbackUrl"  => $this->getNotifyUrl($this->rupeelinkpay_notifyUrl),
        ];

        $data['sign']  = strtoupper(md5($data['orderCode'].'&'.$data['amount'].'&'.$data['address'].'&'.$data['userCode'].'&'.$this->rupeelinkpay_Key));


        try {
            $response = $this->guzzle->post($this->rupeelinkpay_url,$data,$this->header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * unive_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function unive_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "Merchno"      => $this->univepay_merchantNo,
            "Amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            'BankCode' => $withdrawlog['ifsccode'],
            'BankName' => 'BANK',
            'Account' => $withdrawlog['backname'],
            'CardNo' => $withdrawlog['bankaccount'],
            'PaymentType' => 'BankCard',
            "Traceno" => $withdrawlog['ordersn'],
            'NotifyUrl' => $this->getNotifyUrl($this->univepay_notifyUrl) ,
            'Currency' =>  'INR',
        ];



        $signStr = Sign::dataString($data);
        $data['Signature']  = strtoupper(md5($signStr.'&'.$this->univepay_Key));
        $herder = array(
            "Content-Type: application/x-www-form-urlencoded",
        );

        try {
            $response = Curl::post($this->univepay_url,$data,$herder,[],2);
            $response = json_decode(urldecode($response),true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['SerialNo']) && $response['SerialNo']){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['SerialNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * no_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function no_pay($withdrawlog,$type){

        $data   = [
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "merchantMemberNo" => $withdrawlog['uid'],
            "amount"  =>  bcdiv((string)$withdrawlog['protocol_money'],'100',2),
            "coin" => 'USDT',
            "language"  =>  'en',
            "rateType" => 1,
            "protocol" => $withdrawlog['protocol_name'],
            "notifyUrl" => $this->getNotifyUrl($this->nopay_notifyUrl) ,
            "toAddress"  =>  $withdrawlog['bankaccount'],
            "timestamp" => time(),
            "appId" => $this->nopay_merchantNo,
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] =  hash('sha256', $signStr.'&key='.$this->nopay_Key);

        $herder = array(
            "Content-Type: application/json",
            "version: v1",
            "appId: ".$this->nopay_merchantNo,
        );



        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->nopay_url,'header' => $herder],$this->header);
            $response = Curl::post($this->nopay_url,$data,$herder);
            $response = json_decode($response,true);


        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * ms_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ms_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo"      => $this->mspay_merchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            'description' =>  '3377WIN',
            "payAmount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "mobile"  =>  $withdrawlog['phone'],
            "email"  =>  $withdrawlog['email'],
            'bankNumber' => $withdrawlog['bankaccount'],
            'bankCode' => $withdrawlog['ifsccode'],
            'bankName' => 'BANK',
            'accountHoldName' => $withdrawlog['backname'],
            'notifyUrl' =>  $this->getNotifyUrl($this->mspay_notifyUrl)  ,

        ];

        $signStr = Sign::dataString($data);
        $data['sign']  = md5(md5($signStr.'&').$this->mspay_Key);

        try {
            $response = $this->guzzle->post($this->mspay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == 200){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platOrderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * decent_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function decent_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'accountNumber' => $withdrawlog['bankaccount'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            'bankId' => 1,
            'bankCode' => $withdrawlog['ifsccode'],
            'customerName' => $withdrawlog['backname'],
            'description' => '3377WIN',
            "merchantOrderNo" => $withdrawlog['ordersn'],
            'notifyUrl' => $this->getNotifyUrl($this->decentpay_notifyUrl) ,
        ];

        $time = time();
        $signStr = Sign::dataString($data);
        $sign =  strtoupper(md5("merchantNo=".$this->decentpay_merchantNo."&appId=".$this->decentpay_appId."&timestamp=$time&$signStr".$this->decentpay_Key));

        $herder = array(
            "Content-Type: application/json",
            "merchantNo: ".$this->decentpay_merchantNo,
            "appId: ".$this->decentpay_appId,
            "timestamp: ".$time,
            "sign: ".$sign,
        );

        try {

            $response = Curl::post($this->decentpay_url,$data,$herder);
            $response = json_decode($response,true);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['data']['orderNo']) && $response['data']['orderNo']){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * fly_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function fly_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'merchantId' => $this->flypay_merchantNo,
            "merchantOrderNum" => $withdrawlog['ordersn'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            'callBackUrl' => $this->getNotifyUrl($this->flypay_notifyUrl) ,
            'accountName' => $withdrawlog['backname'],
            'bankName' => $withdrawlog['backname'],
            'accountNumber' => $withdrawlog['bankaccount'],
            'ifscCode' => $withdrawlog['ifsccode'],
            "phone"  =>  $withdrawlog['phone'],
            "signType"  =>  'RSA',
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha512WithRsa($signStr,$this->flypay_Key);


        try {

            $response = $this->guzzle->post($this->flypay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 'SUCCESS'){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['platformOrderNum']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * kk_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function kk_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "partnerId"      => $this->kkpay_merchantNo,
            "partnerWithdrawNo"      => $withdrawlog['ordersn'],
            "amount"  =>  (string)$withdrawlog['really_money'],
            "currency"   => 'INR',
            "notifyUrl"  => urlencode($this->getNotifyUrl($this->kkpay_notifyUrl)),
            "receiptMode"  => '1',
            'accountNumber' => urlencode($withdrawlog['bankaccount']),
            'accountName' => urlencode($withdrawlog['backname']),
            "accountPhone"  =>  urlencode($withdrawlog['phone']),
            "accountEmail"  =>  urlencode($withdrawlog['email']),
            "accountExtra1"  =>  $withdrawlog['ifsccode'],
            "accountExtra2"  =>  $withdrawlog['ifsccode'],
            "version"   => '1.0',
        ];

        $signData = $data;
        $signData['notifyUrl'] = $this->getNotifyUrl($this->kkpay_notifyUrl) ;
        $signData['accountNumber'] = $withdrawlog['bankaccount'];
        $signData['accountName'] = $withdrawlog['backname'];
        $signData['accountPhone'] = $withdrawlog['phone'];
        $signData['accountEmail'] = $withdrawlog['email'];
        $signStr = Sign::dataString($signData);

        $data['sign']  = strtoupper(md5($signStr.'&key='.$this->kkpay_merchantKey));
        $herder = array(
            "Content-Type: application/x-www-form-urlencoded",
        );

        try {
//            $response = Curl::get($this->kkpay_url,$data);
            $response = $this->guzzle->get($this->kkpay_url,$data,$this->header);
            //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testGetCurlUrl',['data' => $data,'url' => $this->kkpay_url],$this->header);
            //$response = $this->guzzle->post($this->kkpay_url,$data,$this->header);
            //$response = json_decode(urldecode($response),true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '0000'){

            return ['code' => 200 , 'msg' => '' , 'data' => $withdrawlog['ordersn']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * tk_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function tk_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'merchant_id' => $this->tkpay_merchantNo,
            "order_id" => $withdrawlog['ordersn'],
            "amount"  =>  $withdrawlog['really_money'],
            'name' => $withdrawlog['backname'],
            'bank_code' => $withdrawlog['ifsccode'],
            'account' => $withdrawlog['bankaccount'],
        ];

        $dataString = Sign::dataString($data).'&key='.$this->tkpay_Key;
        $data['sign'] = Sign::RsaPublicEncrypt($dataString,$this->tkpay_public_key);
        $data['withdraw_type'] = 1;
        $data['notify_url'] = $this->getNotifyUrl($this->tkpay_notifyUrl);
        $data['phone'] = $withdrawlog['phone'];
        $data['email'] = $withdrawlog['email'];
        $data['currency'] = 'INR';


        try {

            $response = $this->guzzle->post($this->tkpay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '200'){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * kktwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function kktwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "partnerId"      => $this->kktwopay_merchantNo,
            "partnerWithdrawNo"      => $withdrawlog['ordersn'],
            "amount"  =>  (string)$withdrawlog['really_money'],
            "currency"   => 'INR',
            "notifyUrl"  => urlencode($this->getNotifyUrl($this->kktwopay_notifyUrl)),
            "receiptMode"  => '1',
            'accountNumber' => urlencode($withdrawlog['bankaccount']),
            'accountName' => urlencode($withdrawlog['backname']),
            "accountPhone"  =>  urlencode($withdrawlog['phone']),
            "accountEmail"  =>  urlencode($withdrawlog['email']),
            "accountExtra1"  =>  $withdrawlog['ifsccode'],
            "accountExtra2"  =>  $withdrawlog['ifsccode'],
            "version"   => '1.0',
        ];

        $signData = $data;
        $signData['notifyUrl'] = $this->getNotifyUrl($this->kktwopay_notifyUrl) ;
        $signData['accountNumber'] = $withdrawlog['bankaccount'];
        $signData['accountName'] = $withdrawlog['backname'];
        $signData['accountPhone'] = $withdrawlog['phone'];
        $signData['accountEmail'] = $withdrawlog['email'];
        $signStr = Sign::dataString($signData);

        $data['sign']  = strtoupper(md5($signStr.'&key='.$this->kktwopay_merchantKey));
        $herder = array(
            "Content-Type: application/x-www-form-urlencoded",
        );

        try {
            //$response = Curl::get($this->kktwopay_url,$data);
            $response = $this->guzzle->get($this->kktwopay_url,$data,$this->header);
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testGetCurlUrl',['data' => $data,'url' => $this->kktwopay_url],$this->header);
            //$response = $this->guzzle->post($this->kktwopay_url,$data,$this->header);
            //$response = json_decode(urldecode($response),true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '0000'){

            return ['code' => 200 , 'msg' => '' , 'data' => $withdrawlog['ordersn']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * one_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function one_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchId"      => $this->onepay_merchantNo,
            "txChannel"      => 'TX_INDIA_001',
            "appId"      => $this->onepay_appId,
            "timestamp"      => time(),
            "mchOrderNo"      => $withdrawlog['ordersn'],
            "name"  =>  $withdrawlog['backname'],
            "phone"  =>  (string)$withdrawlog['phone'],
            "email"  =>  $withdrawlog['email'],
            "bankCode"  =>  'BANK_IN',
            "account"  => $withdrawlog['bankaccount'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "notifyUrl"  => $this->getNotifyUrl($this->onepay_notifyUrl),
            "ifsc"  =>  $withdrawlog['ifsccode'],
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha256WithRsa($signStr,$this->onepay_Key);
        $herder = array(
            "Content-Type: application/json",
            "lang: en",
        );


        try {

            $response = Curl::post($this->onepay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == '200'){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platOrderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * global_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function global_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchId"      => $this->globalpay_merchantNo,
            "signType"      => 'md5',
            "mchOrderNo"      => $withdrawlog['ordersn'],
            "amount"  =>  $withdrawlog['really_money'],
            "channelType"      => 'imps',
            "notifyUrl"  => $this->getNotifyUrl($this->globalpay_notifyUrl),
            "bankName"  =>  $withdrawlog['backname'],
            "bankCode"  =>   $withdrawlog['ifsccode'],
            "cardName"  =>   $withdrawlog['backname'],
            "cardNo"  =>   $withdrawlog['bankaccount'],
            "rand"   => time().rand(1111,9999),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->globalpay_Key);

        $herder = array(
            "Content-Type: multipart/form-data",
        );

        try {

            $response = Curl::multipartFormData($this->globalpay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '0'){

            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }





    /**
     * a777_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function a777_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "app_id"      => $this->a777pay_merchantNo,
            "merchant_order_id"      => $withdrawlog['ordersn'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "customer_name"  =>  $withdrawlog['backname'],
            "customer_phone"  =>  (string)$withdrawlog['phone'],
            "customer_email"  =>  $withdrawlog['email'],
            "payout_mode"  =>  'INDIA_IMPS',
            "customer_account_type"  =>  $withdrawlog['ifsccode'],
            "customer_account_no"  =>  $withdrawlog['bankaccount'],
            "notify_url"  => $this->getNotifyUrl($this->a777pay_notifyUrl),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->a777pay_Key);


        try {

            $response = $this->guzzle->post($this->a777pay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['system_order_id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * masat_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function masat_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "appId"      => $this->masatpay_merchantNo,
            "orderNumber"      => $withdrawlog['ordersn'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "bankName"  =>  $withdrawlog['backname'],
            "receiptAccountName"  =>  $withdrawlog['backname'],
            "cardNumber"  =>  $withdrawlog['bankaccount'],
            "mobile"  =>  (string)$withdrawlog['phone'],
            "ifsc"  =>  $withdrawlog['ifsccode'],
            "notifyCallback"  => $this->getNotifyUrl($this->masatpay_notifyUrl) ,
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->masatpay_Key);

        // $herder = array(
        //     "Content-Type: application/json"
        // );

        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->masatpay_url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($this->masatpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 10000){

            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platformOrderNumber']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * ok_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ok_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            'mchNo' => $this->okpay_merchantNo,
            'mchOrderNo' => $withdrawlog['ordersn'],
            'currency' => 'INR',
            'method' => 'IMPS',
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'name' => $withdrawlog['backname'],
            'email' => $withdrawlog['email'],
            'phone' => $withdrawlog['phone'],
            'notifyUrl' =>$this->getNotifyUrl($this->okpay_notifyUrl),
            'productNo' => '191001',
            'withdrawParam' => json_encode([
                'bankCode' => $withdrawlog['ifsccode'],
                'accountName' => $withdrawlog['backname'],
                'accountNumber' => $withdrawlog['bankaccount'],
            ]),
        ];


        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->okpay_Key);

        // $herder = array(
        //     "Content-Type: application/x-www-form-urlencoded"
        // );

        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->okpay_url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($this->okpay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']=="200"){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * l_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function l_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $data = [
            'memberCode' => $this->lpay_merchantNo,
            'orderCardNo' => $withdrawlog['bankaccount'],
            'orderUsername' => $withdrawlog['backname'],
            'memberOrderNo' => $withdrawlog['ordersn'],
            'passageOutCode' => $this->lpay_merchantCode,
            'bankCode' => 'IDPT0001',
            'orderAmount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyurl' =>$this->getNotifyUrl($this->lpay_notifyUrl) ,
            'orderRemark' => $withdrawlog['phone'],
            'datetime' => time().rand(111,222),
            'attach' => $withdrawlog['ifsccode'],
        ];

        $sign_data = $data;
        unset($sign_data['orderRemark'],$sign_data['attach']);
        $sign = Sign::asciiKeyStrtoupperSign($sign_data,$this->lpay_Key);

        $herder = array(
            "Content-Type: application/json",
            "sign: ".$sign,
        );

        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->lpay_url,'header' => $herder],$this->header);
            // $response = $this->guzzle->post($this->lpay_url,$data,$herder);
            $response = Curl::post($this->lpay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']==1){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * liku_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function liku_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }
        $pubulic_data = [
            'appid' => env('LIKU_PAY_APP_ID', ''),
            'nonce' => (string)rand(00000000,999999999),
            'stime' => (string)time()
        ];

        $data   = [
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "amount"  =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "channelId" => "002",
            "userId" => (string)$withdrawlog['uid'],
            "extra"      => [
                'userName' => $withdrawlog['backname'],
                'cardNo' => $withdrawlog['bankaccount'],
                'bankName' => $withdrawlog['backname'],
            ],
        ];
        $sign = Sign::likuPaySign($pubulic_data,$data, env('LIKU_PAY_KEY', ''));

        $herder = array(
            "Content-Type: application/json",
        );
        $url = $this->likupay_url.'?'.$sign;
        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if ($response['code']==200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }
        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * tatatwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function tatatwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantCode"   => (int)$this->tatatwopay_mchId,
            "orderNo" => $withdrawlog['ordersn'],
            "amount" => (int)$withdrawlog['really_money'],
            'notifyUrl' => $this->getNotifyUrl($this->tatatwopay_notifyUrl) ,
            'currency' => 'INR',
            "payType" => 1,
            'accNo' => $withdrawlog['bankaccount'],
            'accName' =>  $withdrawlog['backname'],
            'bankCode' =>  $withdrawlog['ifsccode'],
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'version' =>  '2.0',
            'sign_type' =>  'MD5',
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->tatatwopay_key);
        $herder = array(
            "Content-Type: application/json",
        );
        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->tatatwopay_url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($this->tatatwopay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']=='0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * iq_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function iq_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchant_ref_id" => $withdrawlog['ordersn'],
            "amount" => (float)bcdiv((string)$withdrawlog['really_money'],'100',2),
            'beneficiary_name' =>  $withdrawlog['backname'],
            'bank_name' =>  $withdrawlog['backname'],
            'account_no' => $withdrawlog['bankaccount'],
            'ifsc' =>  $withdrawlog['ifsccode']
        ];

        $sign = Sign::asciiKeyStrtoupperSign($data,env('IQ_PAY_KEY', ''));
        $herder = array(
            "Content-Type: application/json",
            "X-RECON-APIKEY: ".env('IQ_PAY_MCH_ID', ''),
            "X-RECON-SIGNATURE: ".$sign,
        );
        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->iqpay_url,'header' => $herder],$this->header);
            // $response = $this->guzzle->post($this->iqpay_url,$data,$herder);
            $response = Curl::post($this->iqpay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['resp_code']) && $response['resp_code']=='SUCCESS'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['gateway_ref_id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * bo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function bo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'mchNo'   => $this->bopay_mchId,
            'appId'   => $this->bopay_appId,
            'mchOrderNo' => $withdrawlog['ordersn'],
            'amount' => (int)$withdrawlog['really_money'],
            'entryType' => 'IMPS',
            'accountNo' => $withdrawlog['bankaccount'],
            'accountCode' =>  $withdrawlog['ifsccode'],
            'accountName' =>  $withdrawlog['backname'],
            'accountEmail' =>  $withdrawlog['email'],
            'accountPhone' =>  $withdrawlog['phone'],
            'notifyUrl' => $this->getNotifyUrl($this->bopay_notifyUrl) ,
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->bopay_key);
        $herder = array(
            "Content-Type: application/json",
        );
        try {
            // $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->bopay_url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($this->bopay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==0 && isset($response['data']['transferId'])){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['transferId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * bud_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function bud_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $sign_data = 'mid='.env('BUD_PAY_MCH_ID', '').'&key='.env('BUD_PAY_KEY', '').'&amount='.$withdrawlog['really_money'].'&merchant_order_id='.$withdrawlog['ordersn'];

        $data = [
            'amount' => (int)$withdrawlog['really_money'],
            'bene_address' => $withdrawlog['backname'],
            'bene_bank_acct' => $withdrawlog['bankaccount'],
            'bene_email' =>  $withdrawlog['email'],
            'bene_ifsc' =>  $withdrawlog['ifsccode'],
            'bene_name' =>  $withdrawlog['backname'],
            'bene_phone' =>  $withdrawlog['phone'],
            'merchant_order_id' => $withdrawlog['ordersn'],
        ];
        //$this->logger->error('bud_pay提现数据:'.json_encode($data));

        $herder = array(
            "Content-Type: application/json",
            "mid: ".env('BUD_PAY_MCH_ID', ''),
            "signature: ".md5($sign_data),
        );
        try {
            //$response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->budpay_url,'header' => $herder],$this->header);
            //$response = $this->guzzle->post($this->bopay_url,$data,$this->zr_header);
            $response = Curl::post($this->budpay_url,$data,$herder);
            //$this->logger->error('bud_pay提现$response:'.$response);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['order_id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * buss_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function buss_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'merchantId'   => $this->busspay_mchId,
            'merchantOrderId' => $withdrawlog['ordersn'],
            'paymentType' => 'IMPS',
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'ifsc' =>  $withdrawlog['ifsccode'],
            'accountNumber' => $withdrawlog['bankaccount'],
            'userName' =>  $withdrawlog['backname'],
            'mobile' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'callbackUrl' => $this->getNotifyUrl($this->busspay_notifyUrl) ,
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->busspay_key);

        try {
//            $response = $this->guzzle->post('https://cuisine.teenpatticlub.shop/api/Text/testCurlUrl',['data' => $data,'url' => $this->bopay_url,'header' => $herder],$this->header);
            $response = $this->guzzle->post($this->busspay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status']==1000){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * shark_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function shark_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'merchant_id'   => $this->sharkpay_mchId,
            'mer_order_num' => $withdrawlog['ordersn'],
            'price' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'account_name' =>  $withdrawlog['backname'],
            'account_num' => $withdrawlog['bankaccount'],
            'account_bank' => $withdrawlog['backname'],
            'remark' => $withdrawlog['ifsccode'],
            'notify_url' => $this->getNotifyUrl( $this->sharkpay_notifyUrl),
            'timestamp' =>  time(),



        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->sharkpay_key);
        $data['sign_type'] = 'MD5';
        try {
            $response = $this->guzzle->post($this->sharkpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['order_num']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * lemon_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function lemon_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'mer_no'   => $this->lemonpay_mchId,
            'order_no' => $withdrawlog['ordersn'],
            'amount' => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'currency' => 'INR',
            'bank_code' => $withdrawlog['ifsccode'],
            'name' =>  $withdrawlog['backname'],
            'account' => $withdrawlog['bankaccount'],
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'notify_url' =>$this->getNotifyUrl($this->lemonpay_notifyUrl)  ,
        ];

        $signStr = Sign::dataString($data);
        $data['sign'] = Sign::Sha256WithRsa($signStr,$this->lemonpay_key);

        try {

            $response = $this->guzzle->post($this->lemonpay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['sys_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * panda_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function panda_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "orderId" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'accountUser' => $withdrawlog['backname'],
            'accountNo' => $withdrawlog['bankaccount'],
            'accountBank' => 'NA',
            'accountIfsc' =>  $withdrawlog['ifsccode'],
            'notifyUrl' => $this->getNotifyUrl($this->pandapay_notifyUrl),
            'callbackUrl' => $this->getNotifyUrl($this->pandapay_notifyUrl),
            'memo' => 'NA',
        ];


        $SignStr = json_encode($data).$this->pandapay_Key;
        $sign = md5($SignStr);

        $herder = array(
            "Content-Type: application/json",
            "x-app-key: ".$this->pandapay_appkey,
            "x-sign: ".$sign,
        );

        try {
            $response = Curl::post($this->pandapay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * uper_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function uper_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "typeCode" => "indf",
            "ccy_no" => "INR",
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "merchantCode" => $this->uperpay_marchantNo,
            "orderNo" => $withdrawlog['ordersn'],
            "type" => 1,
            'accNo' => $withdrawlog['bankaccount'],
            'accName' => $withdrawlog['backname'],
            'ifsc' =>  $withdrawlog['ifsccode'],
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'notifyUrl' => $this->getNotifyUrl($this->uperpay_notifyUrl),
        ];


        $data['signature'] = Sign::asciiKeyStrtolowerSign($data,$this->uperpay_Key);


        try {
            $response = $this->guzzle->post($this->uperpay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == 'SUCCESS'){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * six6_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function six6_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->six6pay_marchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->six6pay_notifyUrl),
            'bankCode' => substr($withdrawlog['ifsccode'],0,4),
            'branchCode' => $withdrawlog['ifsccode'],
            'paymentType' => 1,
            'cardHolder' => $withdrawlog['backname'],
            'cardNo' => $withdrawlog['bankaccount'],
            'email' =>  $withdrawlog['email'],
            'mobile' =>  $withdrawlog['phone'],
            "currency" => "INR",
            "countryCode" => "INR",
            "device" => $withdrawlog['ifsccode'],
            "payUserId" => $withdrawlog['uid'],
        ];


        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6pay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6pay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6pay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6pay_pub_Key);
            $list = json_decode($list,true);

            if(!isset($list['errorCode']) && isset($list['status']) && $list['status'] != 2){
                return ['code' => 200 , 'msg' => '' , 'data' => $list['orderId']];
            }

        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * mm_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function mm_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            'mer_no' => $this->mmpay_marchantNo,
            "order_no" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            "currency" => "INR",
            'bank_code' =>  $withdrawlog['ifsccode'],
            'name' => $withdrawlog['backname'],
            'account' => $withdrawlog['bankaccount'],
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'notify_url' => $this->getNotifyUrl($this->mmpay_notifyUrl),
        ];


        $signStr = Sign::dataString($data);
        $data["sign"] = Sign::Sha256WithRsa($signStr,$this->mmpay_Key);


        try {
            $response = $this->guzzle->post($this->mmpay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['sys_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * fix_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function fix_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->fixpay_marchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "description" => 'Withdraw',
            "payAmount" =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "mobile"   => $withdrawlog['phone'],
            "email" =>  $withdrawlog['email'],
            "bankNumber" =>  $withdrawlog['bankaccount'],
            'bankCode' =>  $withdrawlog['ifsccode'],
            'bankName' =>  $withdrawlog['backname'],
            'accountHoldName' => $withdrawlog['backname'],
            'notifyUrl' => $this->getNotifyUrl($this->fixpay_notifyUrl),
        ];


        $signStr = Sign::dataString($data);
        $data["sign"] = md5(md5($signStr.'&').$this->fixpay_Key);


        try {

            $response = $this->guzzle->post($this->fixpay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == 200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platOrderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * dp_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function dp_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "shop_phone" => $this->dppay_marchantNo,
            "bank_card_number" =>  $withdrawlog['bankaccount'],
            'bank_name' =>  $withdrawlog['backname'],
            'IFSC' =>  $withdrawlog['ifsccode'],
            "money" =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "passageway_code" =>  'dp01Payout',
            'card_user_name' =>  $withdrawlog['backname'],
            "shop_sub_number" => $withdrawlog['ordersn'],
            'notify_url' => $this->getNotifyUrl($this->dppay_notifyUrl),
        ];

        $body["sign"] = Sign::RsaEncrypt(json_encode($data,JSON_UNESCAPED_SLASHES),$this->dppay_Key);

        $body["shop_phone"] = $data['shop_phone'];

        try {

            $response = $this->guzzle->post($this->dppay_url,$body,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 1){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['sub_payment_number']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * lemontree_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function lemontree_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',0),
            "appKey" => $this->lemontreepay_appKey,
            'callbackUrl' => $this->getNotifyUrl($this->lemontreepay_notifyUrl),
            "account" =>  $withdrawlog['bankaccount'],
            'bankCode' =>  $withdrawlog['ifsccode'],
            'nonce' =>  time().rand(111,999),
            "orderId" => $withdrawlog['ordersn'],
            'personName' =>  $withdrawlog['backname'],
        ];

        $data["sign"] = Sign::asciiKeyStrtoupperSign($data,$this->lemontreepay_appSecret,'secret');

        try {

            $response = $this->guzzle->post($this->lemontreepay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 1){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * zz_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function zz_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "title" => 'Withdraw',
            "outTradeNo" => $withdrawlog['ordersn'],
            "amount" =>  $withdrawlog['really_money'],
            'callbackUrl' =>$this->getNotifyUrl($this->zzpay_notifyUrl),
            'transferMode' => 'Banktransfer',
            'name' =>  $withdrawlog['backname'],
            'phone' =>  $withdrawlog['phone'],
            "account" =>  $withdrawlog['bankaccount'],
            'ifsc' =>  $withdrawlog['ifsccode'],
        ];

        $sign = Sign::asciiKeyStrtolowerSign($data,$this->zzpay_appKey,'appKey');

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "keyId: ".$this->zzpay_appId,
            "sign: ".$sign,
        );



        try {

            $response = Curl::post($this->zzpay_url,$data,$herder);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * s_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function s_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->spay_merchantNo,
            "orderNo" => $withdrawlog['ordersn'],
            "channelType" =>'102',
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',0),
            'notifyUrl' => $this->getNotifyUrl($this->spay_notifyUrl),
            'timestamp' =>  time().rand(111,999),
            'extra' => json_encode([
                'username' => $withdrawlog['backname'],
                'email' => $withdrawlog['email'],
                'phone' => $withdrawlog['phone'],
                'bankname' => 'YESBANK',
                'accountNo' => $withdrawlog['bankaccount'],
                'ifsc' => $withdrawlog['ifsccode'],
            ]),
        ];

        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->spay_appKey);

        try {

            $response = $this->guzzle->post($this->spay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['errorCode']) && $response['errorCode'] == 0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['pOrderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * ant2_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ant2_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchant_id" => $this->ant2pay_merchantNo,
            "order_no" => $withdrawlog['ordersn'],
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',0),
            'bank_no' => $withdrawlog['ifsccode'],
            "account_type" =>'BANK',
            'account_no' => $withdrawlog['bankaccount'],
            'account_name' => $withdrawlog['backname'],
        ];
        $data["sign"] = md5(Sign::asciiKeyStrtolowerSign($data,$this->ant2pay_appKey));
        $data["notify_url"] = $this->getNotifyUrl($this->ant2pay_notifyUrl);
        try {

            $response = $this->guzzle->post($this->ant2pay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == 1){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['trans_id']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * aa_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function aa_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mch_id" => $this->aapay_merchantNo,
            "mch_transferId" => $withdrawlog['ordersn'],
            "transfer_amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',0),
            "apply_date" => date('Y-m-d H:i:s'),
            "bank_code" => 'IDPT0001',
            "receive_name" => $withdrawlog['backname'],
            'receive_account' => $withdrawlog['bankaccount'],
            'remark' => $withdrawlog['ifsccode'],
            'back_url' => $this->getNotifyUrl($this->aapay_notifyUrl),
            'receiver_telephone' => $withdrawlog['phone'],
        ];
        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->aapay_appKey);
        $data["sign_type"] = "MD5";
        try {

            $response = $this->guzzle->post($this->aapay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['respCode']) && $response['respCode'] == 'SUCCESS'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['tradeNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * peu_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function peu_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "appId" => $this->peupay_appId,
            "outTradeNo" => $withdrawlog['ordersn'],
            'ifscCode' => $withdrawlog['ifsccode'],
            'accountNumber' => $withdrawlog['bankaccount'],
            "accountName" => $withdrawlog['backname'],
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',0),
            'asyncUrl' => $this->getNotifyUrl($this->peupay_notifyUrl),
            "nonceStr" => (string)time().rand(111,999),
        ];
        $data["sign"] = Sign::asciiKeyStrtoupperSign($data,$this->peupay_appKey);

        try {

            $response = $this->guzzle->post($this->peupay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['data']['status'])){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['sn']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * fino_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function fino_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->finopay_marchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "beneName" => $withdrawlog['backname'],
            "beneMobile" => $withdrawlog['phone'],
            "beneEmail" => $withdrawlog['email'],
            'accountNumber' => $withdrawlog['bankaccount'],
            'ifscCode' => $withdrawlog['ifsccode'],
            'notifyUrl' => $this->getNotifyUrl($this->finopay_notifyUrl),
        ];

        $data["sign"] = Sign::asciiKeyStrtolowerSign($data,$this->finopay_appKey);

        try {

            $response = $this->guzzle->post($this->finopay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == '0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * ssbase_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ssbase_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "appId" => $this->ssbasepay_appid,
            'account' => $withdrawlog['bankaccount'],
            "accountOwner" => $withdrawlog['backname'],
            "clientIp" => '152.59.149.24',
            'notifyUrl' => $this->getNotifyUrl($this->ssbasepay_notifyUrl),
            'payType' => '4',
            'bankCode' => $withdrawlog['ifsccode'],
            "amount" =>  bcdiv((string)$withdrawlog['really_money'],'100',2),
            "outOrderNo" => $withdrawlog['ordersn'],
            "email" => $withdrawlog['email'],
            "mobile" => $withdrawlog['phone'],
            "userId" => $withdrawlog['uid'],
        ];

        $dataString = Sign::dataString($data);
        $data["sign"] = md5($dataString.$this->ssbasepay_appKey);


        try {

            $response = $this->guzzle->post($this->ssbasepay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['ret']) && $response['ret'] == '0'){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['transOrderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }

    /**
     * ziptwo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function ziptwo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantId"      => (int)$this->ziptwopay_merchantNo,
            "merchantOrderId" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'phone' =>  $withdrawlog['phone'],
            'email' =>  $withdrawlog['email'],
            'currency' =>  'INR',
            "nonce"    => (string)rand(00000000,9999999999),
            "timestamp"  => time().'000',
            'account' => $withdrawlog['bankaccount'],
            'accountName' =>  $withdrawlog['backname'],
            'address' => $withdrawlog['backname'],
            'subBranch' =>  $withdrawlog['ifsccode'],
            'withdrawType' => 1,
            'bankName' => $withdrawlog['backname'],
            'remark' => 'WithDraw',
            'notifyUrl' => $this->getNotifyUrl($this->ziptwopay_notifyUrl),
        ];

        $dataSign = $data['merchantId'] . $data['merchantOrderId'] . $data['amount'] . $data['nonce'] . $data['timestamp'];
        $data['sign'] = Sign::zipPaySign($dataSign,$this->ziptwopay_Key);

        try {
            $response = $this->guzzle->post($this->ziptwopay_url,$data,$this->zr_header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200 && isset($response['data']['platformOrderId'])){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['platformOrderId']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * qq_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function qq_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "appid" => $this->qqpay_appid,
            "out_trade_no" => $withdrawlog['ordersn'],
            "type" => 1,
            'name' =>  $withdrawlog['backname'],
            'bank_account' => $withdrawlog['bankaccount'],
            'bank_code' => $withdrawlog['ifsccode'],
            'branch_code' => $withdrawlog['ifsccode'],
            'email' =>  $withdrawlog['email'],
            'mobile' =>  $withdrawlog['phone'],
            "amount" => $withdrawlog['really_money'],
            'currency' =>  'INR',
            'version' =>  1,
            'notify_url' => $this->getNotifyUrl($this->qqpay_notifyUrl),
        ];

        $data['sign'] = Sign::asciiKeyStrtoupperSign($data,$this->qqpay_appKey);

        try {
            $response = $this->guzzle->post($this->qqpay_url,$data,$this->header);

        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 0){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['order_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * six6two_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function six6two_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->six6twopay_marchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' =>$this->getNotifyUrl($this->six6twopay_notifyUrl),
            'bankCode' => substr($withdrawlog['ifsccode'],0,4),
            'branchCode' => $withdrawlog['ifsccode'],
            'paymentType' => 1,
            'cardHolder' => $withdrawlog['backname'],
            'cardNo' => $withdrawlog['bankaccount'],
            'email' =>  $withdrawlog['email'],
            'mobile' =>  $withdrawlog['phone'],
            "currency" => "INR",
            "countryCode" => "INR",
            "device" => $withdrawlog['ifsccode'],
            "payUserId" => $withdrawlog['uid'],
        ];


        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6twopay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6twopay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6twopay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6twopay_pub_Key);
            $list = json_decode($list,true);

            if(!isset($list['errorCode']) && isset($list['status']) && $list['status'] != 2){
                return ['code' => 200 , 'msg' => '' , 'data' => $list['orderId']];
            }
        }

        isset($list) ? Common::log($withdrawlog['ordersn'],$list,$type) : Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * vendoo2_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function vendoo2_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "mchNo"      => $this->vendoo2pay_merchantNo,
            "mchOrderNo" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'currency' =>  'INR',
            'productNo' => 'INR101',
            'notifyUrl' => $this->getNotifyUrl($this->vendoo2pay_notifyUrl),
            'withdrawParam' => json_encode([
                "method" => 'imps',
                'name' =>  $withdrawlog['backname'],
                'email' =>  $withdrawlog['email'],
                'phone' =>  $withdrawlog['phone'],
                'bankCode' => $withdrawlog['ifsccode'],
                'bankName' => $withdrawlog['backname'],
                'accountNumber' => $withdrawlog['bankaccount'],
            ]),
        ];

        $data['sign']  = Sign::asciiKeyStrtolowerSign($data,$this->vendoo2pay_Key);


        try {
            $response = $this->guzzle->post($this->vendoo2pay_url,$data,$this->header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code'] == 200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['orderNo']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }


    /**
     * show2_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function show2_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchant_id"   => $this->show2pay_mchId,
            "merchant_order_no" => $withdrawlog['ordersn'],
            "order_amount" => bcdiv((string)$withdrawlog['really_money'],'100',0),
            "type" => 'BANK',
            "vpa" => '',
            'email' =>  $withdrawlog['email'],
            'account' => $withdrawlog['bankaccount'],
            'name' =>  $withdrawlog['backname'],
            'ifsc' =>  $withdrawlog['ifsccode'],
            'phone' =>  $withdrawlog['phone'],
            'notify_url' =>  $this->getNotifyUrl($this->show2pay_notifyUrl),
            'noncestr' => mt_rand(100000,999999),
            'action' => 'payout',
            'timestamp' => (new \DateTime())->format('Uv'),
        ];
        // 生成签名
        $data['sign'] = Sign::Sha1WithDSA(
            $data['merchant_id'].
            $data['merchant_order_no'].
            $data['order_amount'].
            $data['noncestr'].
            $data['timestamp'].
            $data['action']
            , $this->show2pay_key);
        try {
            // 获取token
            $token = Pay::show2PayGetToken(
                $this->show2pay_token_url,
                $this->show2pay_token_refresh_url,
                $this->show2pay_mchId,
                $this->show2pay_token_secret
            );
            if (is_array($token)) {
                $this->logger->alert('show2_pay提现获取Token失败：' . var_export($token, true));
                Common::log($withdrawlog['ordersn'], $token, $type);
                return ['code' => 201, 'msg' => '', 'data' => []];
            }

            // 拉起代付接口
            $response = Curl::post($this->show2pay_url, $data, [
                "Content-Type: application/json",
                "Access-Token: " . $token,
            ]);
            $response = json_decode($response,true);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['code']) && $response['code']==200){
            return ['code' => 200 , 'msg' => '' , 'data' => $response['data']['order_no']];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * six6three_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function six6three_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantNo" => $this->six6threepay_marchantNo,
            "merchantOrderNo" => $withdrawlog['ordersn'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'notifyUrl' => $this->getNotifyUrl($this->six6threepay_notifyUrl),
            'bankCode' => substr($withdrawlog['ifsccode'],0,4),
            'branchCode' => $withdrawlog['ifsccode'],
            'paymentType' => 1,
            'cardHolder' => $withdrawlog['backname'],
            'cardNo' => $withdrawlog['bankaccount'],
            'email' =>  $withdrawlog['email'],
            'mobile' =>  $withdrawlog['phone'],
            "currency" => "INR",
            "countryCode" => "INR",
            "device" => $withdrawlog['ifsccode'],
            "payUserId" => $withdrawlog['uid'],
        ];


        $signStr = Sign::dataString($data);
        $requestParam["merchantNo"] = $data['merchantNo'];
        $requestParam["signData"] = Sign::Sha256WithRsa($signStr,$this->six6threepay_Key);
        $requestParam["encryptData"] = Sign::Six6EncryptRsaSign(json_encode($data), $this->six6threepay_Key);

        $herder = array(
            "Content-Type: application/json; charset=utf-8",
            "Content-Length: ".strlen(json_encode($requestParam)),
        );

        $response = Curl::post($this->six6threepay_url,$requestParam,$herder);
        $response = json_decode($response,true);


        if (isset($response['encryptData']) && $response['encryptData']) {

            $list = Sign::SixDecrypt($response['encryptData'],$this->six6threepay_pub_Key);
            $list = json_decode($list,true);

            if(!isset($list['errorCode']) && isset($list['status']) && $list['status'] != 2){
                return ['code' => 200 , 'msg' => '' , 'data' => $list['orderId']];
            }
        }

        isset($list) ? Common::log($withdrawlog['ordersn'],$list,$type) : Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }



    /**
     * leo_pay
     * @param $withdrawlog 用户提现数据
     * @return array
     */
    public function leo_pay($withdrawlog,$type){
        if($withdrawlog['type'] != 1){
            return ['code' => 201 , 'msg' => 'Sorry! Only bank cards are supported' , 'data' => []];
        }

        $data = [
            "merchantCode" => $this->leopay_merchantNo,
            "orderNo" => $withdrawlog['ordersn'],
            "type" => 1,
            'accNo' => $withdrawlog['bankaccount'],
            'accName' =>  $withdrawlog['backname'],
            "amount" => bcdiv((string)$withdrawlog['really_money'],'100',2),
            'bankName' => 'MTN',
            'ccy_no' =>  'INR',
            'notifyUrl' => $this->getNotifyUrl($this->leopay_notifyUrl),
            'iphone' =>  $withdrawlog['phone'],
            'summary' => $withdrawlog['ifsccode'],
            'bankBranch' => 'ZM0001',
        ];

        $data['signature']  = Sign::asciiKeyStrtolowerSign($data,$this->leopay_Key);

        try {

            $response = $this->guzzle->post($this->leopay_url,$data,$this->zr_header);
        }catch (\Exception $e){
            $response = ['Request timed out'];
        }

        if (isset($response['status']) && $response['status'] == 'SUCCESS'){
            return ['code' => 200 , 'msg' => '' , 'data' => 'suc'];
        }

        Common::log($withdrawlog['ordersn'],$response,$type);
        $msg = $this->sendWithdrawFail($withdrawlog,$response); //通知群并返回错误信息

        return ['code' => 201 , 'msg' => $msg , 'data' => []];
    }




    /**
     * 得到回调地址
     * @param string $notify_url 回调地址名称
     * @return string
     */
    private function getNotifyUrl(string $notify_url):string{
        return config('host.apiDomain').'/Withdrawlog/'.$notify_url;
    }

    private function sendWithdrawFail($withdrawlog,$response){
        $msg = '';
//        if(Common::getConfigValue('is_tg_send') == 1) {
//            //发送提现失败消息to Tg
//            $msg = \service\TelegramService::withdrawFail($withdrawlog, $response);
//        }
        return $msg;
    }


    /**
     * 随机生产几位字母
     * @param $length
     * @return string
     */
    private function generateRandomString($uid = '',$length = 6){

        $characters = 'abcdefghijklmnopqrstuvwxyz';
        $randomString = '';

        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, strlen($characters) - 1)];
        }

        return $randomString.$uid;

    }
}
